{"record":{"id":"4a393ed88e6602c4","repo":"typst/typst","slug":"green-component","errorCode":null,"errorMessage":"green component","messagePattern":"green component","errorType":"validation","errorClass":"SourceDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/typst-library/src/visualize/color.rs","lineNumber":540,"sourceCode":"        green: Component,\n        /// The blue component.\n        #[external]\n        blue: Component,\n        /// The alpha component.\n        #[external]\n        alpha: Component,\n        /// Alternatively: The color to convert to linear RGB(A).\n        ///\n        /// If this is given, the individual components should not be given.\n        #[external]\n        color: Color,\n    ) -> SourceResult<Color> {\n        Ok(Self::Process(ProcessColor::LinearRgb(\n            if let Some(color) = args.find::<Color>()? {\n                color.to_linear_rgb()\n            } else {\n                let Component(r) = args.expect(\"red component\")?;\n                let Component(g) = args.expect(\"green component\")?;\n                let Component(b) = args.expect(\"blue component\")?;\n                let Component(a) = args.eat()?.unwrap_or(Component(Ratio::one()));\n                LinearRgb::new(\n                    r.get() as f32,\n                    g.get() as f32,\n                    b.get() as f32,\n                    a.get() as f32,\n                )\n            },\n        )))\n    }\n\n    /// Create an RGB(A) color.\n    ///\n    /// The color is specified in the sRGB color space.\n    ///\n    /// An RGB(A) color is represented internally by an array of four\n    /// components:","sourceCodeStart":522,"sourceCodeEnd":558,"githubUrl":"https://github.com/typst/typst/blob/a51e028041cac426f97d34335bb01d8f1d8e5e8f/crates/typst-library/src/visualize/color.rs#L522-L558","documentation":"Error \"green component\" thrown in typst/typst.","triggerScenarios":"Thrown at crates/typst-library/src/visualize/color.rs:540 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a51e028041cac426f97d34335bb01d8f1d8e5e8f","analyzedAt":"2026-08-16T08:13:58.503Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}