bevy/crates/bevy_text/src
François bcd5318247 color spaces and representation (#1572)
`Color` can now be from different color spaces or representation:
- sRGB
- linear RGB
- HSL

This fixes #1193 by allowing the creation of const colors of all types, and writing it to the linear RGB color space for rendering.

I went with an enum after trying with two different types (`Color` and `LinearColor`) to be able to use the different variants in all place where a `Color` is expected.

I also added the HLS representation because:
- I like it
- it's useful for some case, see example `contributors`: I can just change the saturation and lightness while keeping the hue of the color
- I think adding another variant not using `red`, `green`, `blue` makes it clearer there are differences

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2021-03-17 23:59:51 +00:00
..
draw.rs Add Sprite Flipping (#1407) 2021-03-03 19:26:45 +00:00
error.rs Fix errors and panics to typical Rust conventions (#968) 2020-12-02 11:31:16 -08:00
font_atlas_set.rs Faster compilation of bevy_diagnostic (#1235) 2021-01-12 13:21:45 -08:00
font_atlas.rs Subpixel text positioning (#1196) 2021-01-03 12:39:11 -08:00
font_loader.rs Add support for OTF fonts (#1200) 2021-01-03 12:10:23 -08:00
font.rs color spaces and representation (#1572) 2021-03-17 23:59:51 +00:00
glyph_brush.rs Expose more info in PositionedGlyph (#1319) 2021-01-26 11:53:55 -08:00
lib.rs Bevy ECS V2 (#1525) 2021-03-05 07:54:35 +00:00
pipeline.rs Rich text (#1245) 2021-01-24 17:07:43 -08:00
text2d.rs format comments (#1612) 2021-03-11 00:27:30 +00:00
text.rs Resolve (most) internal system ambiguities (#1606) 2021-03-10 22:37:02 +00:00