All Projects → rstecca → Colorbands

rstecca / Colorbands

Licence: mit
Unity 3D's Gradient is a handy data type but comes with some limitations: for example you cannot set more than 8 color keys in its editor and RGB is the only color space available. ColorBand data type offers an alternative with less limitations. Creating ColorBands is fun and easy; they are stored as assets and can be accessed from code through an Evaluate method to get the color at time t, as for Gradient. RGB (or HSV) values are described by individual curves, allowing a better control over how the color function evolves between your points. Color bands are used in all kinds of applications including games, data visualization and other fields.

Projects that are alternatives of or similar to Colorbands

Colorgrad
Go (Golang) color scales library for maps, charts, data-visualization & creative coding.
Stars: ✭ 96 (-29.93%)
Mutual labels:  data-visualization, color, gradient
Nord Konsole
An arctic, north-bluish clean and elegant Konsole color scheme.
Stars: ✭ 56 (-59.12%)
Mutual labels:  color-scheme, color
Bootstrap Dark
The Definitive Guide to Dark Mode and Bootstrap 4 - A proof of concept
Stars: ✭ 54 (-60.58%)
Mutual labels:  color-scheme, color
Colors App
🎨 A PWA for copying values from popular color palettes. Supports HEX, RGB, and HSL formats.
Stars: ✭ 90 (-34.31%)
Mutual labels:  color-scheme, color
Darkage
🎮 Darkage mod for Minetest
Stars: ✭ 6 (-95.62%)
Mutual labels:  color-scheme, color
Nord Guake
An arctic, north-bluish clean and elegant Guake color theme.
Stars: ✭ 20 (-85.4%)
Mutual labels:  color-scheme, color
Gvcci
color extraction to turn images into 16 color palettes
Stars: ✭ 86 (-37.23%)
Mutual labels:  color-scheme, color
Gradient String
🌈 Beautiful color gradients in terminal output
Stars: ✭ 476 (+247.45%)
Mutual labels:  color, gradient
Nord Hyper
An arctic, north-bluish clean and elegant Hyper theme plugin.
Stars: ✭ 96 (-29.93%)
Mutual labels:  color-scheme, color
Kaloader
Beautiful animated placeholders for showing loading of data
Stars: ✭ 99 (-27.74%)
Mutual labels:  color, gradient
Iceberg.vim
🇦🇶 Bluish color scheme for Vim and Neovim
Stars: ✭ 1,636 (+1094.16%)
Mutual labels:  color-scheme, color
Nord Visual Studio Code
An arctic, north-bluish clean and elegant Visual Studio Code theme.
Stars: ✭ 749 (+446.72%)
Mutual labels:  color-scheme, color
Complimentarygradientview
Create complementary gradients generated from dominant and prominent colors in supplied image. Inspired by Grade.js
Stars: ✭ 691 (+404.38%)
Mutual labels:  color, gradient
Colorschemes.jl
colorschemes, colormaps, gradients, and palettes
Stars: ✭ 55 (-59.85%)
Mutual labels:  color-scheme, color
Fast Average Color
🍏🍊🍅 Fast Average Color
Stars: ✭ 531 (+287.59%)
Mutual labels:  color, gradient
Vim Corvine
The Raven Dark colourscheme for Vim, rebuilt and modified with Colortemplate
Stars: ✭ 76 (-44.53%)
Mutual labels:  color-scheme, color
Chromatic Sketch
Sketch plugin for creating good-looking and perceptually uniform gradients and color scales.
Stars: ✭ 445 (+224.82%)
Mutual labels:  color, gradient
Open Color
Color scheme for UI design.
Stars: ✭ 4,512 (+3193.43%)
Mutual labels:  color-scheme, color
Colors.jl
Color manipulation utilities for Julia
Stars: ✭ 114 (-16.79%)
Mutual labels:  color-scheme, color
Dainty Vs
Dainty for Visual Studio – A color theme generator using Lab color space
Stars: ✭ 115 (-16.06%)
Mutual labels:  color-scheme, color

New Features

19/11/2018: better preview, improved input method and preview update performance.

06/12/2018: inspector testing tools: Sample Test allows to quickly test the color resulting from a [0..1] value.

Please note that whilst images in this documentation are still OK for reference they are not up to date and they will be updated as soon as possible.

ColorBands

Unity 3D's Gradient is a handy data type but comes with some limitations: for example you cannot set more than 8 color keys in its editor and RGB is the only color space available. ColorBand data type offers an alternative with less limitations. Creating ColorBands is fun and easy; they are stored as assets and can be accessed from code through an Evaluate method to get the color at time t, as for Gradient. RGB (or HSV) values are described by individual curves, allowing a better control over how the color function evolves between your points. Color bands are used in all kinds of applications including games, data visualization and other fields.

Screenshot_01.PNG

Examples of color bands you cannot obtain with Unity's Gradient

You cannot do this with Unity 01

You cannot do this with Unity 02

You cannot do this with Unity 03

Usage

  1. Create a new Color Band asset

Screenshot_02.PNG

Newly created ColorBands will be placed in Assets folder's root.

  1. Change its name and its red, green, blue and alpha curves to obtain the desired effect. You can hit Set as filename to quickly set the name from the new color band's filename. Note that curves' values should remain between 0 and 1 in both dimensions time and value.

Screenshot_03.PNG

Screenshot_05.PNG

  1. Declare a public ColorBand variable in your script

  2. Assign a color band asset to it

  3. Use it in code by calling the ColorBand.Evaluate(float t) method where t is a floating point value between 0 and 1.

Screenshot_04.PNG

Discretization

A ColorBand can be discretized which means it will be turned into a set of flat intervals that will return a constant color. To make a ColorBand discrete just set its discrete toggle to true and decide the number of steps the ColorBand will be subdivided into. This will result in discrete bands like the following:

Discrete02.png

Three different discretization methods are available:

  • LEFT_VALUE will build color intervals by evaluating the color at their left extreme.
  • RIGHT_VALUE will build color intervals by evaluating the color at their right extreme.
  • CENTER_VALUE will build color intervals by evaluating the color at their center.

Color Space

ColorCpace.png

ColorBands can be described in the two main, standard color spaces RGB and HSV. By default a ColorBand will be set to RGB. When changing color space all the curves remain unvaried but they represent the respective values of the two spaces so that when switching to HSV, the first curve becomes hue, the second one saturation and the third one value. The alpha curve has the same meaning in both color spaces.

HSVExample.png

Known Issues

  1. In Unity 5.6.4 and likely in other subversions of Unity 5, there's color inconsistency between the preview in the inspector and the actual evaluated values. This can be seen when exporting the ColorBand to PNG. A good case to look at is the ColorBand called 'Red to Blue', included in the repo. The issue seems to have been solved as in Unity 2017 and 2018 this doesn't happen.
  2. In Testing Tools > Sample, the color in the box is not initialized with it's real value at zero. It falls back to black instead.
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].