package bonsai-rt:color
Index
Constants (2)
Procedures (35)
- alpha_transparency_over
- approximate_d65_whitepoint_function
- approximate_spoly_color_test
- approximate_spoly_to_xyz_d65
- approximate_xyz_color_matching_function
- approximate_xyz_d65_to_spoly
- d65_whitepoint_function
- eval_color_ramp
- gamma_correction
- gaussian_fn
- inverse_gamma_correction
- linear_rgb_to_srgb
- linear_rgb_to_xyz
- linear_rgba_to_srgba
- linear_rgbau8_to_linear_rgba
- linear_rgbu8_to_linear_rgba
- sigmoid
- sigmoid_derivative
- sigmoid_polynomial
- sigmoid_polynomial_derivatives
- spoly_color_test
- spoly_to_xyz_d65
- srgb_to_linear_rgb
- srgb_to_srgbu8
- srgb_to_xyz
- srgba_to_linear_rgba
- srgba_to_srgbau8
- srgbau8_from_hex
- srgbau8_to_srgba
- srgbu8_from_hex
- srgbu8_to_srgb
- xyz_color_matching_function
- xyz_d65_to_spoly
- xyz_to_linear_rgb
- xyz_to_srgb
Procedure Groups (0)
This section is empty.
Types
ColorRampNode ¶
ColorRampNode :: struct($T: typeid) { … // See source for fields }
LinearRGBAColor ¶
LinearRGBAColor :: distinct [4]f64
4 component Color in the linear srgb space this means no gamma correction has been applied
Related Procedures With Parameters
Related Procedures With Returns
LinearRGBAU8Color ¶
LinearRGBAU8Color :: distinct [4]u8
4 component Color in the linear srgb space this means no gamma correction has been applied each component as a u8
Related Procedures With Parameters
LinearRGBColor ¶
LinearRGBColor :: distinct [3]f64
3 component Color in the linear srgb space this means no gamma correction has been applied
Related Procedures With Parameters
Related Procedures With Returns
LinearRGBU8Color ¶
LinearRGBU8Color :: distinct [3]u8
3 component Color in the linear srgb space this means no gamma correction has been applied each component as a u8
Related Procedures With Parameters
SPolyColor ¶
SPolyColor :: distinct [3]f64
Related Procedures With Parameters
Related Procedures With Returns
SRGBAColor ¶
SRGBAColor :: distinct [4]f64
4 component Color in the srgb space with gamma correction applied
Related Procedures With Parameters
Related Procedures With Returns
SRGBAU8Color ¶
SRGBAU8Color :: distinct [4]u8
4 component Color in the srgb space with gamma correction applied each component as a u8
Related Procedures With Parameters
Related Procedures With Returns
SRGBColor ¶
SRGBColor :: distinct [3]f64
3 component Color in the srgb space with gamma correction applied
Related Procedures With Parameters
Related Procedures With Returns
SRGBU8Color ¶
SRGBU8Color :: distinct [3]u8
3 component Color in the srgb space with gamma correction applied each component as a u8
Related Procedures With Parameters
Related Procedures With Returns
XYZColor ¶
XYZColor :: distinct [3]f64
Related Procedures With Parameters
Related Procedures With Returns
Constants
WAVE_LENGTH_MAX ¶
WAVE_LENGTH_MAX :: 830
WAVE_LENGTH_MIN ¶
WAVE_LENGTH_MIN :: 360
Variables
D65_WHITEPOINT_FUNCTION_STARTING_AT_300NM ¶
D65_WHITEPOINT_FUNCTION_STARTING_AT_300NM: [531]f64 = …
XYZ_COLOR_MATCH_FUNCTIONS_STARTING_AT_360NM ¶
XYZ_COLOR_MATCH_FUNCTIONS_STARTING_AT_360NM: [471][3]f64 = …
Procedures
alpha_transparency_over ¶
alpha_transparency_over :: proc(above: LinearRGBAColor, below: LinearRGBAColor) -> LinearRGBAColor {…}
alpha transparency over operator
approximate_spoly_color_test ¶
approximate_spoly_color_test :: proc(t: ^testing.T) {…}
approximate_spoly_to_xyz_d65 ¶
approximate_spoly_to_xyz_d65 :: proc(p: SPolyColor) -> XYZColor {…}
a version of spoly_to_xyz_d65 that uses gaussian approximations of the color match functions and whitepoint
approximate_xyz_d65_to_spoly ¶
approximate_xyz_d65_to_spoly :: proc(xyz: XYZColor) -> (SPolyColor, f64) {…}
a version of xyz_d65_to_spoly that uses gaussian approximations of the color match functions and whitepoint
eval_color_ramp ¶
eval_color_ramp :: proc(color_ramp: []ColorRampNode($T), t: f64) -> $T {…}
linear_rgb_to_srgb ¶
linear_rgb_to_srgb :: proc(rgb_linear: LinearRGBColor) -> SRGBColor {…}
linear_rgb_to_xyz ¶
linear_rgb_to_xyz :: proc(linear_rgb: LinearRGBColor) -> XYZColor {…}
linear_rgba_to_srgba ¶
linear_rgba_to_srgba :: proc(rgb_linear: LinearRGBAColor) -> SRGBAColor {…}
linear_rgbau8_to_linear_rgba ¶
linear_rgbau8_to_linear_rgba :: proc(linear_rgba_u8: LinearRGBAU8Color) -> LinearRGBAColor {…}
linear_rgbu8_to_linear_rgba ¶
linear_rgbu8_to_linear_rgba :: proc(linear_rgb_u8: LinearRGBU8Color) -> LinearRGBColor {…}
spoly_color_test ¶
spoly_color_test :: proc(t: ^testing.T) {…}
spoly_to_xyz_d65 ¶
spoly_to_xyz_d65 :: proc(p: SPolyColor) -> XYZColor {…}
returns the xyz color output if a light with d65 spectrum is shone upon a surface with the spoly color
srgb_to_linear_rgb ¶
srgb_to_linear_rgb :: proc(srgb: SRGBColor) -> LinearRGBColor {…}
srgb_to_srgbu8 ¶
srgb_to_srgbu8 :: proc(srgb: SRGBColor) -> SRGBU8Color {…}
srgba_to_linear_rgba ¶
srgba_to_linear_rgba :: proc(srgb: SRGBAColor) -> LinearRGBAColor {…}
srgba_to_srgbau8 ¶
srgba_to_srgbau8 :: proc(srgb: SRGBAColor) -> SRGBAU8Color {…}
srgbau8_from_hex ¶
srgbau8_from_hex :: proc(hex: u32) -> SRGBAU8Color {…}
srgbau8_to_srgba ¶
srgbau8_to_srgba :: proc(srgba_u8: SRGBAU8Color) -> SRGBAColor {…}
srgbu8_from_hex ¶
srgbu8_from_hex :: proc(hex: u32) -> SRGBU8Color {…}
srgbu8_to_srgb ¶
srgbu8_to_srgb :: proc(srgb_u8: SRGBU8Color) -> SRGBColor {…}
xyz_d65_to_spoly ¶
xyz_d65_to_spoly :: proc(xyz: XYZColor) -> (SPolyColor, f64) {…}
the inverse of spoly_to_xyz_d65
xyz_to_linear_rgb ¶
xyz_to_linear_rgb :: proc(xyz: XYZColor) -> LinearRGBColor {…}
Procedure Groups
This section is empty.
Source Files
Generation Information
Generated with odin version dev-2025-04 (vendor "odin") Linux_amd64 @ 2025-05-13 09:15:52.882742034 +0000 UTC