bevy_render: add a small color box to each color (#4387)

# Objective

- bevy_render: add a small color box to each color

## Solution

![bevy_color_doc](https://user-images.githubusercontent.com/1318472/161241226-e7632a90-f526-44de-a68e-ff63b848164b.png)

---

## Changelog
This commit is contained in:
Light Ning 2022-04-01 20:52:22 +00:00
parent 648544faf1
commit dd2001f2f1

View file

@ -47,43 +47,81 @@ pub enum Color {
}
impl Color {
/// <div style="background-color:rgb(94%, 97%, 100%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const ALICE_BLUE: Color = Color::rgb(0.94, 0.97, 1.0);
/// <div style="background-color:rgb(98%, 92%, 84%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const ANTIQUE_WHITE: Color = Color::rgb(0.98, 0.92, 0.84);
/// <div style="background-color:rgb(49%, 100%, 83%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const AQUAMARINE: Color = Color::rgb(0.49, 1.0, 0.83);
/// <div style="background-color:rgb(94%, 100%, 100%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const AZURE: Color = Color::rgb(0.94, 1.0, 1.0);
/// <div style="background-color:rgb(96%, 96%, 86%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const BEIGE: Color = Color::rgb(0.96, 0.96, 0.86);
/// <div style="background-color:rgb(100%, 89%, 77%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const BISQUE: Color = Color::rgb(1.0, 0.89, 0.77);
/// <div style="background-color:rgb(0%, 0%, 0%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const BLACK: Color = Color::rgb(0.0, 0.0, 0.0);
/// <div style="background-color:rgb(0%, 0%, 100%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const BLUE: Color = Color::rgb(0.0, 0.0, 1.0);
/// <div style="background-color:rgb(86%, 8%, 24%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const CRIMSON: Color = Color::rgb(0.86, 0.08, 0.24);
/// <div style="background-color:rgb(0%, 100%, 100%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const CYAN: Color = Color::rgb(0.0, 1.0, 1.0);
/// <div style="background-color:rgb(25%, 25%, 25%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const DARK_GRAY: Color = Color::rgb(0.25, 0.25, 0.25);
/// <div style="background-color:rgb(0%, 50%, 0%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const DARK_GREEN: Color = Color::rgb(0.0, 0.5, 0.0);
/// <div style="background-color:rgb(100%, 0%, 100%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const FUCHSIA: Color = Color::rgb(1.0, 0.0, 1.0);
/// <div style="background-color:rgb(100%, 84%, 0%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const GOLD: Color = Color::rgb(1.0, 0.84, 0.0);
/// <div style="background-color:rgb(50%, 50%, 50%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const GRAY: Color = Color::rgb(0.5, 0.5, 0.5);
/// <div style="background-color:rgb(0%, 100%, 0%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const GREEN: Color = Color::rgb(0.0, 1.0, 0.0);
/// <div style="background-color:rgb(28%, 0%, 51%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const INDIGO: Color = Color::rgb(0.29, 0.0, 0.51);
/// <div style="background-color:rgb(20%, 80%, 20%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const LIME_GREEN: Color = Color::rgb(0.2, 0.8, 0.2);
/// <div style="background-color:rgb(50%, 0%, 0%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const MAROON: Color = Color::rgb(0.5, 0.0, 0.0);
/// <div style="background-color:rgb(10%, 10%, 44%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const MIDNIGHT_BLUE: Color = Color::rgb(0.1, 0.1, 0.44);
/// <div style="background-color:rgb(0%, 0%, 50%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const NAVY: Color = Color::rgb(0.0, 0.0, 0.5);
/// <div style="background-color:rgba(0%, 0%, 0%, 0%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const NONE: Color = Color::rgba(0.0, 0.0, 0.0, 0.0);
/// <div style="background-color:rgb(50%, 50%, 0%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const OLIVE: Color = Color::rgb(0.5, 0.5, 0.0);
/// <div style="background-color:rgb(100%, 65%, 0%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const ORANGE: Color = Color::rgb(1.0, 0.65, 0.0);
/// <div style="background-color:rgb(100%, 27%, 0%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const ORANGE_RED: Color = Color::rgb(1.0, 0.27, 0.0);
/// <div style="background-color:rgb(100%, 8%, 57%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const PINK: Color = Color::rgb(1.0, 0.08, 0.58);
/// <div style="background-color:rgb(50%, 0%, 50%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const PURPLE: Color = Color::rgb(0.5, 0.0, 0.5);
/// <div style="background-color:rgb(100%, 0%, 0%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const RED: Color = Color::rgb(1.0, 0.0, 0.0);
/// <div style="background-color:rgb(98%, 50%, 45%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const SALMON: Color = Color::rgb(0.98, 0.5, 0.45);
/// <div style="background-color:rgb(18%, 55%, 34%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const SEA_GREEN: Color = Color::rgb(0.18, 0.55, 0.34);
/// <div style="background-color:rgb(75%, 75%, 75%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const SILVER: Color = Color::rgb(0.75, 0.75, 0.75);
/// <div style="background-color:rgb(0%, 50%, 50%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const TEAL: Color = Color::rgb(0.0, 0.5, 0.5);
/// <div style="background-color:rgb(100%, 39%, 28%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const TOMATO: Color = Color::rgb(1.0, 0.39, 0.28);
/// <div style="background-color:rgb(25%, 88%, 82%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const TURQUOISE: Color = Color::rgb(0.25, 0.88, 0.82);
/// <div style="background-color:rgb(93%, 51%, 93%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const VIOLET: Color = Color::rgb(0.93, 0.51, 0.93);
/// <div style="background-color:rgb(100%, 100%, 100%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const WHITE: Color = Color::rgb(1.0, 1.0, 1.0);
/// <div style="background-color:rgb(100%, 100%, 0%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const YELLOW: Color = Color::rgb(1.0, 1.0, 0.0);
/// <div style="background-color:rgb(60%, 80%, 20%); width: 10px; padding: 10px; border: 1px solid;"></div>
pub const YELLOW_GREEN: Color = Color::rgb(0.6, 0.8, 0.2);
/// New `Color` from sRGB colorspace.