MCPcopy Create free account

hub / github.com/Canop/coolor / functions

Functions60 in github.com/Canop/coolor

↓ 30 callersMethodinto
(self)
src/color.rs:111
↓ 11 callersMethodto_ansi
Return the nearest ANSI color This is a slow function as it literally tries all ANSI colors and picks the nearest one.
src/hsl.rs:53
↓ 11 callersMethodto_rgb
(self)
src/hsl.rs:66
↓ 8 callersMethodto_hsl
(self)
src/rgb.rs:73
↓ 6 callersMethodnearest_ansi_in_range
(self, min: u8, max: u8)
src/rgb.rs:23
↓ 5 callersFunctiondist
(a: f32, b: f32)
src/hsl.rs:136
↓ 5 callersFunctionprint_ansi
(ansi: AnsiColor)
examples/ansi-mix/main.rs:16
↓ 4 callersMethodto_hsl
(self)
src/ansi.rs:15
↓ 3 callersMethodbp
blue part in `[0,1]`
src/rgb.rs:113
↓ 3 callersMethoddistance_to
tentatively perceptual distance between the two colors, except it's just as unscientific it can possibly be so check it looks good before trying ot us
src/hsl.rs:99
↓ 3 callersMethodgp
green part in `[0,1]`
src/rgb.rs:109
↓ 3 callersFunctionhue_to_rgb_component
(v1: f32, v2: f32, vh: f32)
src/hsl.rs:123
↓ 3 callersFunctionprint_color
(ansi: AnsiColor)
examples/ansi-variations/main.rs:8
↓ 3 callersFunctionr255
(v: f32)
src/rgb.rs:140
↓ 3 callersMethodrp
red part in `[0,1]`
src/rgb.rs:105
↓ 2 callersMethoddistance_to
(self, other: O)
src/rgb.rs:130
↓ 2 callersMethodhsl
(self)
src/color.rs:22
↓ 2 callersMethodparts
(self)
src/rgb.rs:116
↓ 2 callersFunctionprint_color
(c: Color)
examples/rgb-to-ansi/main.rs:14
↓ 2 callersFunctionrand_ansi
()
examples/ansi-mix/main.rs:12
↓ 1 callersMethodansi
(self)
src/color.rs:15
↓ 1 callersFunctionbar
(n: usize)
examples/ansi-mix/main.rs:20
↓ 1 callersFunctioncompare
(rgb: Rgb)
examples/rgb-to-ansi/main.rs:19
↓ 1 callersMethoddelta_h
(self, other: Hsl)
src/hsl.rs:87
↓ 1 callersMethoddelta_l
(self, other: Hsl)
src/hsl.rs:93
↓ 1 callersMethoddelta_s
(self, other: Hsl)
src/hsl.rs:90
↓ 1 callersFunctionprint_color
(c: Color)
examples/ansi-grey/main.rs:13
↓ 1 callersMethodrgb
(self)
src/color.rs:29
↓ 1 callersFunctionshow
(rgb: Rgb, ansi: AnsiColor)
examples/ansi-grey/main.rs:18
↓ 1 callersMethodwith_luminosity_change
(self, delta_luminosity: f32)
src/ansi.rs:22
↓ 1 callersMethodwith_saturation_change
(self, delta_saturation: f32)
src/ansi.rs:32
Methodblend
compute a natural feeling intermediate between two colors
src/color.rs:40
Functioncheck_array_lengths
()
src/ansi.rs:2611
Methodchecked
Create a new HSL color from its components, checking the ranges
src/hsl.rs:23
Methodfrom
(ansi: AnsiColor)
src/hsl.rs:113
Methodfrom
(ansi: AnsiColor)
src/color.rs:62
Methodfrom
Convert from a (r,g,b) float tupples with components in [0,1[
src/rgb.rs:146
Methodis_grey
(self)
src/rgb.rs:19
Methodluma
(self)
src/color.rs:36
Methodluma
Compute the Luma value characterizing the "light" of the color, going from 0 (black) to 1 (white). Reference: <https://en.wikipedia.org/wiki/Luma_(vi
src/rgb.rs:123
Functionmain
()
examples/ansi-grey/main.rs:25
Functionmain
()
examples/ansi-variations/main.rs:12
Functionmain
()
examples/ansi-mix/main.rs:24
Functionmain
()
examples/rgb-to-ansi/main.rs:28
Methodmix
(c1: Self, w1: f32, c2: Self, w2: f32)
src/hsl.rs:30
Methodmix
(c1: Self, w1: f32, c2: Self, w2: f32)
src/rgb.rs:63
Methodnear
Tell whether it's about the same color There's no theory behind this function, it should not be used outside of unit tests
src/hsl.rs:107
Methodnew
(code: u8)
src/ansi.rs:12
Methodnew
Create a new HSL color from its components
src/hsl.rs:16
Methodnew
Create a new RGB color from its components
src/rgb.rs:16
Functiontest_ansi_to_hsl_to_ansi
()
src/color.rs:137
Functiontest_ansi_to_rgb_to_ansi
()
src/color.rs:125
Functiontest_hsl_to_rgb_to_hsl
()
src/color.rs:159
Functiontest_rgb_to_hsl
()
src/color.rs:148
Methodto_ansi
Return the nearest ANSI color The ansi->rgb->ansi round trip is guaranteed to always fall on the first color.
src/rgb.rs:40
Functionto_hexa
Return the hexa notation commonly used for the web
examples/ansi-grey/main.rs:9
Functionto_hexa
Return the hexa notation commonly used for the web
examples/rgb-to-ansi/main.rs:10
Methodto_rgb
(self)
src/ansi.rs:19
Methodwith_luminosity
(self, l: f32)
src/ansi.rs:27
Methodwith_saturation
(self, s: f32)
src/ansi.rs:37