Color is an extension of the standard library package image/color.
It provides multiple color spaces, conversions between each of them, color distance measuring and multiple palettes.
- 24-bit RGB colors
- 48-bit RGB colors
- HSI colors
- HSL colors
- HSV colors
- L*a*b* colors
- XYZ colors
A RGB
color is made up of three components (each an unsigned 8-bit integer):
R
: Red channelG
: Green channelB
: Blue channel
A RGB48
color is made up of three components (each an unsigned 16-bit
integer):
R
: Red channelG
: Green channelB
: Blue channel
A HSL
color is made up of three components (each a 64-bit floating-point
number):
H
: HueS
: SaturationL
: Lightness
See Wikipedia for more information as to how this differs from HSV and HSI.
A HSV
color is made up of three components (each a 64-bit floating-point
number):
H
: HueS
: SaturationV
: Value
See Wikipedia for more information as to how this differs from HSL and HSI.
A HSI
color is made up of three components (each a 64-bit floating-point
number):
H
: HueS
: SaturationI
: Intensity
See Wikipedia for more information as to how this differs from HSL and HSV.
XYZ
represents a color in the CIE 1931 XYZ color space and is made up of three
components (each a 64-bit floating-point number):
X
: A mix of the three CIE RGB curvesY
: LuminanceZ
: Quasi-equal to blue (of CIE RGB)
Lab
represents a color in the CIELAB color space and is made up of three
components (each a 64-bit floating-point number):
L
: LightnessA
: Position between red and greenB
: Position between yellow and blue
- X11 (as named color constants)
- Microsoft Windows default 16-color palette (
palette.Windows16
) - Microsoft Windows default 20-color palette (
palette.Windows20
) - Apple Macintosh default 16-color palette (
palette.Macintosh
) - RISC OS default palette (
palette.RISC
) - Bluecurve icon palette (
palette.Bluecurve
) - Eclipse-style palette (
palette.Eclipse
) - Tango Desktop Project palette (
palette.Tango
) - Palettes by Adam C. Younis:
- Apollo (
palette.Apollo
)
- Apollo (
- Palettes by Adigun A. Polack:
- AAP-16 (
palette.AAP16
) - AAP-64 (
palette.AAP64
) - AAP-MajestyXVII (
palette.AAPMajestyXVII
) - AAP-Micro12 (
palette.AAPMicro12
) - AAP-RadiantXV (
palette.AAPRadiantXV
) - AAP-Splendor128 (
palette.AAPSplendor128
) - Petite-8 (
palette.Petite8
) - Petite-8 Afterdark (
palette.Petite8Afterdark
) - SimpleJPC-16 (
palette.SimpleJPC16
)
- AAP-16 (
- Palettes by BlackedIRL:
- BLK 36 (
palette.BLK36
) - BLK AQU4 (
palette.BLKAQU4
) - NOPAL-12 (
palette.NOPAL12
)
- BLK 36 (
- Palettes by Conker:
- Pollen8 (
palette.Pollen8
)
- Pollen8 (
- Palettes by ENDESGA:
- ARQ4 (
palette.ARQ4
) - ARQ16 (
palette.ARQ16
) - EDG77 (
palette.EDG77
) - EN4 (
palette.EN4
) - Endesga 8 (
palette.Endesga8
) - Endesga 16 (
palette.Endesga16
) - Endesga 32 (
palette.Endesga32
) - Endesga 36 (
palette.Endesga36
) - Endesga 64 (
palette.Endesga64
) - Endesga Soft 16 (
palette.EndesgaSoft16
) - ENOS16 (
palette.ENOS16
) - hept32 (
palette.Hept32
) - SUPERFUTURE25 (
palette.SUPERFUTURE25
)
- ARQ4 (
- Palettes by Gabriel C.:
- Fantasy 24 (
palette.Fantasy24
)
- Fantasy 24 (
- Palettes by Kerrie Lake:
- Coldfire GB (
palette.ColdfireGB
) - Earth GB (
palette.EarthGB
) - Ice Cream GB (
palette.IceCreamGB
) - Island Joy 16 (
palette.IslandJoy16
) - Mist GB (
palette.MistGB
) - Nymph GB (
palette.NymphGB
) - Peachy Pop 16 (
palette.PeachyPop16
) - Resurrect 32 (
palette.Resurrect32
) - Resurrect 64 (
palette.Resurrect64
) - Rustic GB (
palette.RusticGB
) - Wish GB (
palette.WishGB
)
- Coldfire GB (
- Palettes by Kirokaze:
- Kirokaze Gameboy (
palette.KirokazeGameboy
)
- Kirokaze Gameboy (
- Palettes by Nauris:
- NA16 (
palette.NA16
)
- NA16 (
- Palettes by PineappleOnPizza:
- Bubblegum 16 (
palette.Bubblegum16
) - Cave (
palette.Cave
) - Journey (
palette.Journey
) - Pear36 (
palette.Pear36
) - Pineapple 32 (
palette.Pineapple32
) - Rosy 42 (
palette.Rosy42
) - Taffy 16 (
palette.Taffy16
)
- Bubblegum 16 (
- Palettes by Slynyrd:
- Steam Lords (
palette.SteamLords
)
- Steam Lords (
- Palettes by Vinik:
- Vinik24 (
palette.Vinik24
)
- Vinik24 (
- Conversion between color models/spaces
- Distance calculations between colors in all color models/spaces
- Palette creation from image