All Projects → iamartyom → ColorHelper

iamartyom / ColorHelper

Licence: MIT license
No description or website provided.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to ColorHelper

vscode-color
Helper with GUI to generate color codes such as CSS color notations.
Stars: ✭ 88 (+158.82%)
Mutual labels:  hex, hsl, rgb, hsv, cmyk
colorsys.rs
Lib for modifying colors and converting to other spaces
Stars: ✭ 28 (-17.65%)
Mutual labels:  hex, color, hsl, rgb, cmyk
ColorMinePortable
ColorMinePortable
Stars: ✭ 37 (+8.82%)
Mutual labels:  hex, hsl, rgb, cmyk, xyz
colorsys
🎨 Minimalistic color converter for RGB, HSV, HSL, CMYK, HEX and CSS strings
Stars: ✭ 53 (+55.88%)
Mutual labels:  hex, color, rgb, hsv, cmyk
colors-convert
🦚 A simple colors library
Stars: ✭ 15 (-55.88%)
Mutual labels:  hex, hsl, rgb, cmyk
Values.js
🍇 Get the tints and shades of a color
Stars: ✭ 97 (+185.29%)
Mutual labels:  hex, color, hsl, rgb
tc-lib-color
PHP library to manipulate various color representations
Stars: ✭ 19 (-44.12%)
Mutual labels:  color, hsl, rgb, cmyk
Culori
A comprehensive color library for JavaScript.
Stars: ✭ 271 (+697.06%)
Mutual labels:  hex, color, hsl, rgb
khroma
A collection of functions for manipulating CSS colors, inspired by SASS.
Stars: ✭ 28 (-17.65%)
Mutual labels:  hex, color, hsl, rgb
Farge
🎈Tell the name of hex color
Stars: ✭ 23 (-32.35%)
Mutual labels:  hex, color, hsl, rgb
color
A library of well-tested helper methods for working with colors.
Stars: ✭ 13 (-61.76%)
Mutual labels:  hex, color, hsl, rgb
Colorhighlight
🎨 Lightweight Color Highlight colorizer for Sublime Text
Stars: ✭ 76 (+123.53%)
Mutual labels:  hex, color, hsl, rgb
Color
A little library to deal with color conversions
Stars: ✭ 166 (+388.24%)
Mutual labels:  hex, color, rgb
Gradstop
JavaScript micro library to generate gradient color stops 🏳️‍🌈
Stars: ✭ 144 (+323.53%)
Mutual labels:  hex, hsl, rgb
andColorPicker
Color picker library for Android
Stars: ✭ 233 (+585.29%)
Mutual labels:  hsl, rgb, cmyk
Alfred-Colors-workflow
hex <=> rgb <=> hsl
Stars: ✭ 28 (-17.65%)
Mutual labels:  hex, hsl, rgb
hex-to-css-filter
Easy way to generate colors from HEX to CSS Filters
Stars: ✭ 20 (-41.18%)
Mutual labels:  hex, color, rgb
React Color Extractor
A React component which extracts colors from an image
Stars: ✭ 314 (+823.53%)
Mutual labels:  hex, hsl, rgb
ichiColor
Full features javascript color parser module, perfect work with vue.js; support RGB, HSL, HSV/HSB, HSL255, HSL240, HWB, XYZ, LAB, LUV, LHCab, xyY...
Stars: ✭ 23 (-32.35%)
Mutual labels:  color, hsl, hsv
Xcodecolorsense
🎈 An Xcode plugin that makes working with color easier
Stars: ✭ 79 (+132.35%)
Mutual labels:  hex, color, rgb

ColorHelper - Useful methods for work with color spaces

Supported color spaces:

  • RGB
  • HEX
  • CMYK
  • HSV
  • HSL
  • XYZ
  • YIQ
  • YUV

This library provides several useful classes:

ColorConverter

Convert Rgb to Hex:

HEX hex = ColorConverter.RgbToHex(new RGB(10, 20, 30));

Convert Rgb to Cmyk:

CMYK cmyk = ColorConverter.RgbToCmyk(new RGB(10, 20, 30));

Convert Rgb to Hsv:

HSV hsv = ColorConverter.RgbToHsv(new RGB(10, 20, 30));

Convert Rgb to Hsl:

HSL hsl = ColorConverter.RgbToHsl(new RGB(10, 20, 30));

Convert Rgb to Xyz:

XYZ xyz = ColorConverter.RgbToXyz(new RGB(10, 20, 30));

Convert Rgb to Yiq:

YIQ yiq = ColorConverter.RgbToYiq(new RGB(10, 20, 30));

Convert Rgb to Yuv:

YUV yuv = ColorConverter.RgbToYuv(new RGB(10, 20, 30));

Convert Hex to Rgb:

RGB rgb = ColorConverter.HexToRgb(new HEX("#00FF00"));

Convert Hex to Cmyk:

CMYK cmyk = ColorConverter.HexToCmyk(new HEX("#00FF00"));

Convert Hex to Hsv:

HSV hsv = ColorConverter.HexToHsv(new HEX("#00FF00"));

Convert Hex to Hsl:

HSL hsl = ColorConverter.HexToHsl(new HEX("#00FF00"));

Convert Hex to Xyz:

XYZ xyz = ColorConverter.HexToXyz(new HEX("#00FF00"));

Convert Hex to Yiq:

YIQ yiq = ColorConverter.HexToYiq(new HEX("#00FF00"));

Convert Hex to Yuv:

YUV yuv = ColorConverter.HexToYuv(new HEX("#00FF00"));

Convert Cmyk to Rgb:

RGB rgb = ColorConverter.CmykToRgb(new CMYK(0, 100, 0, 100));

Convert Cmyk to Hex:

HEX hex = ColorConverter.CmykToHex(new CMYK(0, 100, 0, 100));

Convert Cmyk to Hsv:

HSV hsv = ColorConverter.CmykToHsv(new CMYK(0, 100, 0, 100));

Convert Cmyk to Hsl:

HSL hsl = ColorConverter.CmykToHsl(new CMYK(0, 100, 0, 100));

Convert Cmyk to Xyz:

XYZ xyz = ColorConverter.CmykToXyz(new CMYK(0, 100, 0, 100));

Convert Cmyk to Yiq:

YIQ yiq = ColorConverter.CmykToYiq(new CMYK(0, 100, 0, 100));

Convert Cmyk to Yuv:

YUV yuv = ColorConverter.CmykToYuv(new CMYK(0, 100, 0, 100));

Convert Hsv to Rgb:

RGB rgb = ColorConverter.HsvToRgb(new HSL(0, 0, 100));

Convert Hsv to Hex:

HEX hex = ColorConverter.HsvToHex(new HSL(0, 0, 100));

Convert Hsv to Cmyk:

CMYK cmyk = ColorConverter.HsvToCmyk(new HSL(0, 0, 100));

Convert Hsv to Hsl:

HSV hsv = ColorConverter.HsvToHsl(new HSL(0, 0, 100));

Convert Hsv to Xyz:

XYZ xyz = ColorConverter.HsvToXyz(new HSL(0, 0, 100));

Convert Hsv to Yiq:

YIQ yiq = ColorConverter.HsvToYiq(new HSL(0, 0, 100));

Convert Hsv to Yuv:

YUV yuv = ColorConverter.HsvToYuv(new HSL(0, 0, 100));

Convert Hsl to Rgb:

RGB rgb = ColorConverter.HslToRgb(new HSL(0, 0, 100));

Convert Hsl to Hex:

HEX hex = ColorConverter.HslToHex(new HSL(0, 0, 100));

Convert Hsl to Cmyk:

CMYK cmyk = ColorConverter.HslToCmyk(new HSL(0, 0, 100));

Convert Hsl to Hsv:

HSV hsv = ColorConverter.HslToHsv(new HSL(0, 0, 100));

Convert Hsl to Xyz:

XYZ xyz = ColorConverter.HslToXyz(new HSL(0, 0, 100));

Convert Hsl to Yiq:

YIQ yiq = ColorConverter.HslToYiq(new HSL(0, 0, 100));

Convert Hsl to Yuv:

YUV yuv = ColorConverter.HslToYuv(new HSL(0, 0, 100));

Convert Xyz to Rgb:

RGB rgb = ColorConverter.XyzToRgb(new XYZ(0, 0, 10));

Convert Xyz to Hex:

HEX hex = ColorConverter.XyzToHex(new XYZ(0, 0, 10));

Convert Xyz to Cmyk:

CMYK cmyk = ColorConverter.XyzToCmyk(new XYZ(0, 0, 10));

Convert Xyz to Hsv:

HSV hsv = ColorConverter.XyzToHsv(new XYZ(0, 0, 10));

Convert Xyz to Hsl:

HSL hsl = ColorConverter.XyzToHsl(new XYZ(0, 0, 10));

Convert Xyz to Yiq:

YIQ yiq = ColorConverter.XyzToYiq(new XYZ(0, 0, 10));

Convert Xyz to Yuv:

YUV yuv = ColorConverter.XyzToYuv(new XYZ(0, 0, 10));

Convert Yiq to Rgb:

RGB rgb = ColorConverter.YiqToRgb(new YIQ(0.1, 0.1, 0.2));

Convert Yiq to Hex:

HEX hex = ColorConverter.YiqToHex(new YIQ(0.1, 0.1, 0.2));

Convert Yiq to Cmyk:

CMYK cmyk = ColorConverter.YiqToCmyk(new YIQ(0.1, 0.1, 0.2));

Convert Yiq to Hsv:

HSV hsv = ColorConverter.YiqToHsv(new YIQ(0.1, 0.1, 0.2));

Convert Yiq to Hsl:

HSL hsl = ColorConverter.YiqToHsl(new YIQ(0.1, 0.1, 0.2));

Convert Yiq to Xyz:

YIQ yiq = ColorConverter.YiqToXyz(new YIQ(0.1, 0.1, 0.2));

Convert Yiq to Yuv:

YUV yuv = ColorConverter.YiqToYuv(new YIQ(0.1, 0.1, 0.2));

Convert Yuv to Rgb:

RGB rgb = ColorConverter.YuvToRgb(new YUV(0.1, 0.1, 0.1));

Convert Yuv to Hex:

HEX hex = ColorConverter.YuvToHex(new YUV(0.1, 0.1, 0.1));

Convert Yuv to Cmyk:

CMYK cmyk = ColorConverter.YuvToCmyk(new YUV(0.1, 0.1, 0.1));

Convert Yuv to Hsv:

HSV hsv = ColorConverter.YuvToHsv(new YUV(0.1, 0.1, 0.1));

Convert Yuv to Hsl:

HSL hsl = ColorConverter.YuvToHsl(new YUV(0.1, 0.1, 0.1));

Convert Yuv to Xyz:

YIQ yiq = ColorConverter.YuvToXyz(new YUV(0.1, 0.1, 0.1));

Convert Yuv to Yiq:

YIQ yiq = ColorConverter.YuvToYiq(new YUV(0.1, 0.1, 0.1));

ColorComparer

bool result = ColorComparer.Equals(new RGB(100, 100, 100), new HEX("#FFFFFF"));

You can use Equals method with all pair color combinations.

ColorGenerator

This class provides in this moment logic for get random colors.

Get random color:

RGB rgb = ColorGenerator.GetRandomColor<RGB>();
HEX hex = ColorGenerator.GetRandomColor<HEX>();
CMYK cmyk = ColorGenerator.GetRandomColor<CMYK>();
HSV hsv = ColorGenerator.GetRandomColor<HSV>();
HSL hsl = ColorGenerator.GetRandomColor<HSL>();
XYZ xyz = ColorGenerator.GetRandomColor<XYZ>();
YIQ yiq = ColorGenerator.GetRandomColor<YIQ>();
YUV yuv = ColorGenerator.GetRandomColor<YUV>();

Get light random color:

RGB rgb = ColorGenerator.GetLightRandomColor<type>();

Get dark random color:

RGB rgb = ColorGenerator.GetDarkRandomColor<type>();

Enums:

  • ColorName - Enum with many color names:
RGB rgb = ColorName.Aquamarine.ToRgb();
HEX hex = ColorName.RedPurple.ToHex();
CMYK cmyk = ColorName.SpanishRed.ToCmyk();
HSV hsv = ColorName.Coral.ToHsv();
HSL hsl = ColorName.NeonFuchsia.ToHsl();
XYZ xyz = ColorName.Raspberry.ToXyz();
YIQ yiq = ColorName.Coffee.ToYiq();
YUV yuv = ColorName.Purple.Toyuv();
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].