[go: up one dir, main page]

0% found this document useful (0 votes)
32 views30 pages

Referência de Pixel FastLED - FastLED Wiki GitHub

The FastLED library provides two main pixel types: CRGB for RGB color representation and CHSV for HSV color representation. CRGB objects consist of three one-byte values for red, green, and blue, while CHSV objects represent hue, saturation, and value. The library allows for easy conversion between these color models and offers various methods for setting and manipulating colors efficiently.

Uploaded by

ernandofranco
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views30 pages

Referência de Pixel FastLED - FastLED Wiki GitHub

The FastLED library provides two main pixel types: CRGB for RGB color representation and CHSV for HSV color representation. CRGB objects consist of three one-byte values for red, green, and blue, while CHSV objects represent hue, saturation, and value. The library allows for easy conversion between these color models and offers various methods for setting and manipulating colors efficiently.

Uploaded by

ernandofranco
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

FastLED / FastLED

Code Issues 173 Pull requests 22 Actions Projects Wiki Security Insights

Pixel reference
Jump to bottom

Daniel Garcia edited this page on 22 Jun 2018 · 9 revisions

Overview
There's two main pixel types in the library - the CRGB class and the CHSV class. CHSV objects
have to be converted to CRGB objects before they can be written out. You can also write CHSV
objects into the CRGB array and have the translation occur as necessary.

CRGB Reference
CHSV Object Reference
Predefined Colors Reference

CRGB Reference
<wiki:toc max_depth="3" />

A "CRGB" is an object representing a color in RGB color space. It contains simply:

a one byte value (0-255) representing the amount of red,


a one byte value (0-255) representing the amount of green,
a one byte value (0-255) representing the amount of blue in a given color.

Typically, when using this library, each LED strip is represented as an array of CRGB colors, one
color for each LED pixel.

#define NUM_LEDS 160

CRGB leds[ NUM_LEDS ];

For more general information on what the RGB color space is, see
http://en.wikipedia.org/wiki/RGB_color_model

https://github.com/FastLED/FastLED/wiki/Pixel-reference 1/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Data Members
CRGB has three one-byte data members, each representing one of the three red, green, and blue
color channels of the color. There is more than one way to access the RGB data; each of these
following examples does exactly the same thing:

// The three color channel values can be referred to as "red", "green", and "blue"...
leds[i].red = 50;
leds[i].green = 100;
leds[i].blue = 150;

// ...or, using the shorter synonyms "r", "g", and "b"...


leds[i].r = 50;
leds[i].g = 100;
leds[i].b = 150;

// ...or as members of a three-element array:


leds[i][0] = 50; // red
leds[i][1] = 100; // green
leds[i][2] = 150; // blue

Direct Access
You are welcome, and invited, to directly access the underlying memory of this object if that suits
your needs. That is to say, there is no "CRGB::setRed( myRedValue )" method; instead you just
directly store 'myRedValue' into the ".red" data member on the object. All of the methods on the
CRGB class expect this, and will continue to operate normally. This is a bit unusual for a C++
class, but in a microcontroller environment this can be critical to maintain performance.

The CRGB object "is trivially copyable", meaning that it can be copied from one place in memory
to another and still function normally.

Methods
In addition to simply providing data storage for the RGB colors of each LED pixel, the CRGB class
also provides several useful methods color-manipulation, some of which are implemented in
assembly language for speed and compactness. Often using the class methods described here is
faster and smaller than hand-written C/C++ code to achieve the same thing.

Setting RGB Colors

https://github.com/FastLED/FastLED/wiki/Pixel-reference 2/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

CRGB colors can be set by assigning values to the individual red, green, and blue channels. In
addition, CRGB colors can be set a number of other ways which are often more convenient and
compact. The two pieces of code below perform the exact same function.

//Example 1: set color from red, green, and blue components individually
leds[i].red = 50;
leds[i].green = 100;
leds[i].blue = 150;

//Example 2: set color from red, green, and blue components all at once
leds[i] = CRGB( 50, 100, 150);

Some performance-minded programmers may be concerned that using the 'high level', 'object-
oriented' code in the second example comes with a penalty in speed or code size. However, this
is simply not the case; the examples above generate literally identical machine code, taking up
exactly the same amount of program memory, and executing in exactly the same amount of
time. Given that, the choice of which way to write the code, then, is entirely a matter of personal
taste and style. All other things being equal, the simpler, higher-level, more object-oriented code
is generally recommended.

Here are the other high-level ways to set a CRGB color in one step:

// Example 3: set color via 'hex color code' (0xRRGGBB)


leds[i] = 0xFF007F;

// Example 4: set color via any named HTML web color


leds[i] = CRGB::HotPink;

// Example 5: set color via setRGB


leds[i].setRGB( 50, 100, 150);

Again, for the performance-minded programmer, it's worth noting that all of the examples above
compile down into exactly the same number of machine instructions. Choose the method that
makes your code the simplest, most clear, and easiest to read and modify.

Colors can also be copied from one CRGB to another:

// Copy the CRGB color from one pixel to another


leds[i] = leds[j];

If you are copying a large number of colors from one (part of an) array to another, the standard
library function memmove can be used to perform a bulk transfer; the CRGB object "is trivially
copyable".

https://github.com/FastLED/FastLED/wiki/Pixel-reference 3/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

// Copy ten led colors from leds[src .. src+9] to leds[dest .. dest+9]


memmove( &leds[dest], &leds[src], 10 * sizeof( CRGB) );

Performance-minded programmers using AVR/ATmega MCUs to move large number of colors in


this way may wish to use the alternative "memmove8" library function, as it is measurably faster
than the standard libc "memmove".

Setting HSV Colors

Introduction to HSV
CRGB color objects use separate red, green, and blue channels internally to represent each
composite color, as this is exactly the same way that multicolor LEDs do it: they have one red
LED, one green LED, and one blue LED in each 'pixel'. By mixing different amounts of red, green,
and blue, thousands or millions of resultant colors can be displayed.

However, working with raw RGB values in your code can be awkward in some cases. For example,
it is difficult to work express different tints and shades of a single color using just RGB values,
and it can be particular daunting to describe a 'color wash' in RGB that cycles around a rainbow
of hues while keeping a constant brightness.

To simplify working with color in these ways, the library provides access to an alternate color
model based on three different axes: Hue, Saturation, and Value (or 'Brightness'). For a complete
discussion of HSV color, see http://en.wikipedia.org/wiki/HSL_and_HSV , but briefly:

Hue is the 'angle' around a color wheel


Saturation is how 'rich' (versus pale) the color is
Value is how 'bright' (versus dim) the color is

In the library, the "hue" angle is represented as a one-byte value ranging from 0-255. It runs
from red to orange, to yellow, to green, to aqua, to blue, to purple, to pink, and back to red. Here
are the eight cardinal points of the hue cycle in the library, and their corresponding hue angle.

https://github.com/FastLED/FastLED/wiki/Pixel-reference 4/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Click here for full-size chart.

Red (0..) "HUE_RED"


Orange (32..) "HUE_ORANGE"
Yellow (64..) "HUE_YELLOW"
Green (96..) "HUE_GREEN"
Aqua (128..) "HUE_AQUA"
Blue (160..) "HUE_BLUE"
Purple (192..) "HUE_PURPLE"
Pink(224..) "HUE_PINK"

Often in other HSV color spaces, hue is represented as an angle from 0-360 degrees. But for
compactness, efficiency, and speed, this library represents hue as a single-byte number from 0-
255. There's a full wiki page how FastLED deals with HSV colors here.

"saturation" is a one-byte value ranging from 0-255, where 255 means "completely saturated,
pure color", 128 means "half-saturated, a light, pale color", and 0 means "completely de-
saturated: plain white".

"valor" é um valor de um byte que varia de 0 a 255, representando brilho, onde 255 significa
"completamente brilhante, totalmente iluminado", 128 significa "um pouco esmaecido, apenas
meio iluminado" e zero significa "completamente escuro: preto".

O objeto CHSV
Na biblioteca, um objeto CHSV é usado para representar uma cor no espaço de cores HSV. O
objeto CHSV possui os três membros de dados de um byte que você pode esperar:

matiz (ou 'h')


saturação (ou 'sat', ou apenas 's')
valor (ou 'val' ou apenas 'v') Eles podem ser manipulados diretamente da mesma maneira
que vermelho, verde e azul podem estar em um objeto CRGB. Objetos CHSV também são
"trivialmente copiáveis".

https://github.com/FastLED/FastLED/wiki/Pixel-reference 5/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

// Set up a CHSV color


CHSV paleBlue( 160, 128, 255);

// Now...
// paleBlue.hue == 160
// paleBlue.sat == 128
// paleBlue.val == 255

Conversão automática de cores


A biblioteca fornece métodos rápidos e eficientes para converter uma cor CHSV em uma cor
CRGB. Muitos deles são automáticos e não requerem código explícito.

Por exemplo, para definir um led para uma cor especificada no HSV, você pode simplesmente
atribuir uma cor CHSV a uma cor CRGB:

// Set color from Hue, Saturation, and Value.


// Conversion to RGB is automatic.
leds[i] = CHSV( 160, 255, 255);

// alternate syntax
leds[i].setHSV( 160, 255, 255);

// set color to a pure, bright, fully saturated, hue


leds[i].setHue( 160);

Não há conversão de CRGB para CHSV fornecida com a biblioteca neste momento.

Conversão explícita de cores


Existem dois espaços de cores HSV diferentes: "espectro" e "arco-íris", e eles não são exatamente
a mesma coisa. A Wikipedia tem uma boa discussão aqui
http://en.wikipedia.org/wiki/Rainbow#Number_of_colours_in_spectrum_or_rainbow, mas para os
propósitos da biblioteca, pode ser resumida da seguinte forma:

Os "espectros" quase não têm amarelo real; a faixa amarela é incrivelmente estreita.
Os "arco-íris" têm uma faixa amarela aproximadamente da largura das faixas 'laranja' e
'verde' ao redor; a faixa amarela é fácil de ver.

Todas as conversões automáticas de cores na biblioteca usam o espaço de cores "HSV Rainbow",
mas através do uso de rotinas explícitas de conversão de cores, você pode optar por usar o
espaço de cores "HSV Spectrum". Há uma página wiki completa de como o FastLED lida com
cores HSV aqui .

A primeira função de conversão de cores explícita é hsv2rgb_rainbow, usada nas conversões


automáticas de cores:

https://github.com/FastLED/FastLED/wiki/Pixel-reference 6/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

// HSV (Rainbow) to RGB color conversion


CHSV hsv( 160, 255, 255); // pure blue in HSV Rainbow space
CRGB rgb;
hsv2rgb_rainbow( hsv, rgb);
// rgb will now be (0, 0, 255) -- pure blue as RGB

O espaço de cores do HSV Spectrum possui diferentes pontos cardeais, e apenas seis deles, que
são correspondentemente distribuídos mais numericamente. Aqui está o mapa de cores
"Spectrum" que o FastLED fornece se você chamar hsv2rgb_spectrum explicitamente:

Clique aqui para obter o gráfico em tamanho real.

Vermelho (0 ..)
Amarelo (42 ..)
Verde (85 ..)
Aqua (128 ..)
Azul (171 ..)
Roxo (213 ..)

A API da função de conversão hsv2rgb_spectrum é idêntica à hsv2rgb_rainbow:

// HSV (Spectrum) to RGB color conversion


CHSV hsv( 171, 255, 255); // pure blue in HSV Spectrum space
CRGB rgb;
hsv2rgb_spectrum( hsv, rgb);
// rgb will now be (0, 0, 255) -- pure blue as RGB

Por que usar o espaço de cores Spectrum, em vez de Rainbow? O espaço de cores do HSV
Spectrum pode ser convertido em RGB um pouco mais rápido do que o espaço de cores do HSV
Rainbow - mas os resultados não são tão bons visualmente; o pouco amarelo que aparece
parece sombrio e, com brilhos mais baixos, quase acastanhado. Portanto, há uma troca entre
alguns ciclos de relógio e a qualidade visual. Em geral, comece com as funções Rainbow (ou,
melhor ainda, com as conversões automáticas), e desça para as funções Spectrum somente se
você ficar completamente sem velocidade.

https://github.com/FastLED/FastLED/wiki/Pixel-reference 7/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

As duas funções de conversão do espaço de cores também podem converter uma matriz de
cores CHSV em uma matriz correspondente de cores CRGB:

// Convert ten CHSV rainbow values to ten CRGB values;


CHSV hsvs[10];
CRGB leds[10];
// (set hsv values here)
hsv2rgb_rainbow( hsvs, leds, 10); // convert all

A função "hsv2rgb_spectrum" também pode ser chamada dessa maneira para conversões em
massa.

Comparando cores
As cores do CRGB podem ser comparadas para correspondências exatas usando == e! =.

As cores do CRGB podem ser comparadas para níveis de luz relativos usando <,>, <= e =>.
Observe que esta é uma comparação numérica simples e nem sempre corresponde ao brilho
percebido das cores.

Muitas vezes, é útil verificar se uma cor é completamente "preta" ou se está "acesa". Você pode
fazer isso testando a cor diretamente com 'if' ou usando-a em qualquer outro contexto
booleano.

// Test if a color is lit at all (versus pure black)


if( leds[i] ) {
/* it is somewhat lit (not pure black) */
} else {
/* it is completely black */
}

Color Math
A biblioteca suporta um rico conjunto de operações de 'matemática de cores' que você pode
executar em uma ou mais cores. Por exemplo, se você quiser adicionar um pouco de vermelho a
uma cor de LED existente, faça o seguinte:

// Here's all that's needed to add "a little red" to an existing LED color:
leds[i] += CRGB( 20, 0, 0);

É isso aí.

https://github.com/FastLED/FastLED/wiki/Pixel-reference 8/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Se você já fez esse tipo de coisa manualmente, pode notar que falta algo: a verificação do canal
vermelho transbordando além das 255. Tradicionalmente, você provavelmente já teve que fazer
algo assim:

// Add a little red, the old way.


uint16_t newRed;
newRed = leds[i].r + 20;
if( newRed > 255) newRed = 255; // prevent wrap-around
leds[i].r = newRed;

Esse tipo de lógica de adicionar e verificar e ajustar se necessário é resolvida dentro do código
da biblioteca para adicionar duas cores CRGB, dentro do operador + e operador + =. Além disso,
grande parte dessa lógica é implementada diretamente na linguagem assembly e é
substancialmente menor e mais rápida que o código C / C ++ correspondente. O resultado
líquido é que você não precisa mais fazer todas as verificações e seu programa também é
executado mais rapidamente.

Essas operações de 'matemática da cor' fazem parte do que torna a biblioteca rápida: permite
desenvolver seu código mais rapidamente, além de executá-lo mais rapidamente.

Todas as operações matemáticas definidas nas cores do CRGB são automaticamente protegidas
contra quebra, estouros e subfluxo.

Adicionando e subtraindo cores

// Add one CRGB color to another.


leds[i] += CRGB( 20, 0, 0);

// Add a constant amount of brightness to all three (RGB) channels.


leds[i].addToRGB(20);

// Add a constant "1" to the brightness of all three (RGB) channels.


leds[i]++;

// Subtract one color from another.


leds[i] -= CRGB( 20, 0, 0);

// Subtract a contsant amount of brightness from all three (RGB) channels.


leds[i].subtractFromRGB(20);

// Subtract a constant "1" from the brightness of all three (RGB) channels.
leds[i]--;

Cores de escurecimento e brilho

https://github.com/FastLED/FastLED/wiki/Pixel-reference 9/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Existem dois métodos diferentes para escurecer uma cor: estilo "vídeo" e estilo "matemática
bruta". O estilo de vídeo é o padrão e é explicitamente projetado para nunca diminuir
acidentalmente nenhum dos canais RGB de um LED aceso (não importa o quão escuro) para um
LED aceso - porque isso geralmente parece errado com baixos níveis de brilho. O estilo
"matemática bruta" acabará por ficar preto.

As cores são sempre esmaecidas por uma fração. A fração de escurecimento é expressa em 256º,
portanto, se você deseja diminuir uma cor em 25% do brilho atual, primeiro é necessário
expressá-lo em 256º. Nesse caso, 25% = 64/256.

// Dim a color by 25% (64/256ths)


// using "video" scaling, meaning: never fading to full black
leds[i].fadeLightBy( 64 );

Você também pode expressar isso da outra maneira: deseja diminuir o pixel para 75% do brilho
atual. 75% = 192/256. Existem duas maneiras de escrever isso, e ambas farão a mesma coisa. O
primeiro usa o operador% =; a lógica aqui é que você está definindo a nova cor como "uma
porcentagem" do valor anterior:

// Reduce color to 75% (192/256ths) of its previous value


// using "video" scaling, meaning: never fading to full black
leds[i] %= 192;

A outra maneira é chamar diretamente a função de dimensionamento subjacente. Observe o


sufixo "video".

// Reduce color to 75% (192/256ths) of its previous value


// using "video" scaling, meaning: never fading to full black
leds[i].nscale8_video( 192);

Se você deseja que a cor desapareça até o preto, use uma destas funções:

// Dim a color by 25% (64/256ths)


// eventually fading to full black
leds[i].fadeToBlackBy( 64 );

// Reduce color to 75% (192/256ths) of its previous value


// eventually fading to full black
leds[i].nscale8( 192);

Também é fornecida uma função para aumentar uma determinada cor até o brilho máximo,
mantendo o mesmo tom:

https://github.com/FastLED/FastLED/wiki/Pixel-reference 10/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

// Adjust brightness to maximum possible while keeping the same hue.


leds[i].maximizeBrightness();

Finalmente, as cores também podem ser ampliadas ou reduzidas usando multiplicação e divisão.

// Divide each channel by a single value


leds[i] /= 2;

// Multiply each channel by a single value


leds[i] *= 2;

Restringindo cores dentro dos limites


A biblioteca fornece uma função que permite 'fixar' cada um dos canais RGB para estar dentro
dos mínimos e máximos. Você pode forçar todos os canais de cores a terem pelo menos um
determinado valor ou, no máximo, um determinado valor. Estes podem ser combinados para
limitar o mínimo e o máximo.

// Bring each channel up to at least a minimum value. If any channel's


// value is lower than the given minimum for that channel, it is
// raised to the given minimum. The minimum can be specified separately
// for each channel (as a CRGB), or as a single value.
leds[i] |= CRGB( 32, 48, 64);
leds[i] |= 96;

// Clamp each channel down to a maximum value. If any channel's


// value is higher than the given maximum for that channel, it is
// reduced to the given maximum. The minimum can be specified separately
// for each channel (as a CRGB), or as a single value.
leds[i] &= CRGB( 192, 128, 192);
leds[i] &= 160;

Funções de cores diversas


A biblioteca fornece uma função que 'inverte' cada canal RGB. A execução desta operação duas
vezes resulta na mesma cor com a qual você começou.

// Invert each channel


leds[i] = -leds[i];

A biblioteca também fornece funções para procurar o brilho aparente (ou matemático) de uma
cor.

https://github.com/FastLED/FastLED/wiki/Pixel-reference 11/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

// Get brightness, or luma (brightness, adjusted for eye's sensitivity to


// different light colors. See http://en.wikipedia.org/wiki/Luma_(video) )
uint8_t luma = leds[i].getLuma();
uint8_t avgLight = leds[i].getAverageLight();

Lista de cores predefinidas


Observe - essas cores predefinidas são definidas usando as definições de W3C RGB. Essas
definições são projetadas com monitores RGB em mente, não LEDs RGB e, portanto, as cores
exibidas nas tiras de LED podem ser um pouco diferentes do que você espera. Em nossa
experiência, as cores geralmente são muito pálidas ou desbotadas (excessivamente
dessaturadas).

Nome da cor Valor hexadecimal Exemplo

CRGB :: AliceBlue 0xF0F8FF

CRGB :: Ametista 0x9966CC

CRGB :: AntiqueWhite 0xFAEBD7

CRGB :: Aqua 0x00FFFF

CRGB :: Aquamarine 0x7FFFD4

https://github.com/FastLED/FastLED/wiki/Pixel-reference 12/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: Azure 0xF0FFFF

CRGB :: Bege 0xF5F5DC

CRGB :: Bisque 0xFFE4C4

CRGB :: Preto 0x000000

CRGB :: BlanchedAlmond 0xFFEBCD

CRGB :: Azul 0x0000FF

CRGB :: BlueViolet 0x8A2BE2

CRGB :: Marrom 0xA52A2A

https://github.com/FastLED/FastLED/wiki/Pixel-reference 13/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: BurlyWood 0xDEB887

CRGB :: CadetBlue 0x5F9EA0

CRGB :: Chartreuse 0x7FFF00

CRGB :: Chocolate 0xD2691E

CRGB :: Coral 0xFF7F50

CRGB :: CornflowerBlue 0x6495ED

CRGB :: Cornsilk 0xFFF8DC

CRGB :: Crimson 0xDC143C

https://github.com/FastLED/FastLED/wiki/Pixel-reference 14/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: Ciano 0x00FFFF

CRGB :: DarkBlue 0x00008B

CRGB :: DarkCyan 0x008B8B

CRGB :: DarkGoldenrod 0xB8860B

CRGB :: DarkGray 0xA9A9A9

CRGB :: DarkGreen 0x006400

CRGB :: DarkKhaki 0xBDB76B

CRGB :: DarkMagenta 0x8B008B

https://github.com/FastLED/FastLED/wiki/Pixel-reference 15/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: DarkOliveGreen 0x556B2F

CRGB :: DarkOrange 0xFF8C00

CRGB :: DarkOrchid 0x9932CC

CRGB :: DarkRed 0x8B0000

CRGB :: DarkSalmon 0xE9967A

CRGB :: DarkSeaGreen 0x8FBC8F

CRGB :: DarkSlateBlue 0x483D8B

CRGB :: DarkSlateGray 0x2F4F4F

https://github.com/FastLED/FastLED/wiki/Pixel-reference 16/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: DarkTurquoise 0x00CED1

CRGB :: DarkViolet 0x9400D3

CRGB :: DeepPink 0xFF1493

CRGB :: DeepSkyBlue 0x00BFFF

CRGB :: DimGray 0x696969

CRGB :: DodgerBlue 0x1E90FF

CRGB :: FireBrick 0xB22222

CRGB :: FloralWhite 0xFFFAF0

https://github.com/FastLED/FastLED/wiki/Pixel-reference 17/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: ForestGreen 0x228B22

CRGB :: Fúcsia 0xFF00FF

CRGB :: Gainsboro 0xDCDCDC

CRGB :: GhostWhite 0xF8F8FF

CRGB :: Ouro 0xFFD700

CRGB :: Goldenrod 0xDAA520

CRGB :: Cinza 0x808080

CRGB :: Verde 0x008000

https://github.com/FastLED/FastLED/wiki/Pixel-reference 18/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: VerdeAmarelo 0xADFF2F

CRGB :: Honeydew 0xF0FFF0

CRGB :: HotPink 0xFF69B4

CRGB :: IndianRed 0xCD5C5C

CRGB :: Indigo 0x4B0082

CRGB :: Marfim 0xFFFFF0

CRGB :: Khaki 0xF0E68C

CRGB :: Lavanda 0xE6E6FA

https://github.com/FastLED/FastLED/wiki/Pixel-reference 19/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: LavenderBlush 0xFFF0F5

CRGB :: LawnGreen 0x7CFC00

CRGB :: LemonChiffon 0xFFFACD

CRGB :: LightBlue 0xADD8E6

CRGB :: LightCoral 0xF08080

CRGB :: LightCyan 0xE0FFFF

CRGB :: LightGoldenrodYellow 0xFAFAD2

CRGB :: LightGreen 0x90EE90

https://github.com/FastLED/FastLED/wiki/Pixel-reference 20/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: LightGrey 0xD3D3D3

CRGB :: LightPink 0xFFB6C1

CRGB :: LightSalmon 0xFFA07A

CRGB :: LightSeaGreen 0x20B2AA

CRGB :: LightSkyBlue 0x87CEFA

CRGB :: LightSlateGray 0x778899

CRGB :: LightSteelBlue 0xB0C4DE

CRGB :: LightYellow 0xFFFFE0

https://github.com/FastLED/FastLED/wiki/Pixel-reference 21/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: Lime 0x00FF00

CRGB :: LimeGreen 0x32CD32

CRGB :: Linho 0xFAF0E6

CRGB :: Magenta 0xFF00FF

CRGB :: Maroon 0x800000

CRGB :: MediumAquamarine 0x66CDAA

CRGB :: MediumBlue 0x0000CD

CRGB :: MediumOrchid 0xBA55D3

https://github.com/FastLED/FastLED/wiki/Pixel-reference 22/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: MediumPurple 0x9370DB

CRGB :: MediumSeaGreen 0x3CB371

CRGB :: MediumSlateBlue 0x7B68EE

CRGB :: MediumSpringGreen 0x00FA9A

CRGB :: MediumTurquoise 0x48D1CC

CRGB :: MediumVioletRed 0xC71585

CRGB :: MidnightBlue 0x191970

CRGB :: MintCream 0xF5FFFA

https://github.com/FastLED/FastLED/wiki/Pixel-reference 23/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: MistyRose 0xFFE4E1

CRGB :: Mocassim 0xFFE4B5

CRGB :: NavajoWhite 0xFFDEAD

CRGB :: Marinha 0x000080

CRGB :: OldLace 0xFDF5E6

CRGB :: Olive 0x808000

CRGB :: OliveDrab 0x6B8E23

CRGB :: Laranja 0xFFA500

https://github.com/FastLED/FastLED/wiki/Pixel-reference 24/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: OrangeRed 0xFF4500

CRGB :: Orquídea 0xDA70D6

CRGB :: PaleGoldenrod 0xEEE8AA

CRGB :: PaleGreen 0x98FB98

CRGB :: PaleTurquoise 0xAFEEEE

CRGB :: PaleVioletRed 0xDB7093

CRGB :: PapayaWhip 0xFFEFD5

CRGB :: PeachPuff 0xFFDAB9

https://github.com/FastLED/FastLED/wiki/Pixel-reference 25/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: Peru 0xCD853F

CRGB :: Rosa 0xFFC0CB

CRGB :: Plaid 0xCC5533

CRGB :: Ameixa 0xDDA0DD

CRGB :: PowderBlue 0xB0E0E6

CRGB :: Roxo 0x800080

CRGB :: Vermelho 0xFF0000

CRGB :: RosyBrown 0xBC8F8F

https://github.com/FastLED/FastLED/wiki/Pixel-reference 26/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: RoyalBlue 0x4169E1

CRGB :: SaddleBrown 0x8B4513

CRGB :: Salmão 0xFA8072

CRGB :: SandyBrown 0xF4A460

CRGB :: SeaGreen 0x2E8B57

CRGB :: Seashell 0xFFF5EE

CRGB :: Sienna 0xA0522D

CRGB :: Prata 0xC0C0C0

https://github.com/FastLED/FastLED/wiki/Pixel-reference 27/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: SkyBlue 0x87CEEB

CRGB :: SlateBlue 0x6A5ACD

CRGB :: SlateGray 0x708090

CRGB :: Neve 0xFFFAFA

CRGB :: SpringGreen 0x00FF7F

CRGB :: SteelBlue 0x4682B4

CRGB :: Tan 0xD2B48C

CRGB :: Teal 0x008080

https://github.com/FastLED/FastLED/wiki/Pixel-reference 28/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: Cardo 0xD8BFD8

CRGB :: Tomate 0xFF6347

CRGB :: Turquesa 0x40E0D0

CRGB :: Violeta 0xEE82EE

CRGB :: Trigo 0xF5DEB3

CRGB :: Branco 0xFFFFFF

CRGB :: WhiteSmoke 0xF5F5F5

CRGB :: Amarelo 0xFFFF00

https://github.com/FastLED/FastLED/wiki/Pixel-reference 29/30
27/06/2020 Referência de pixel · FastLED / FastLED Wiki · GitHub

Nome da cor Valor hexadecimal Exemplo

CRGB :: YellowGreen 0x9ACD32

Páginas 28.

Documentação
perguntas frequentes
Visão geral
LEDs de fiação
Uso básico
LEDs de controle
Referência de Pixel
Referência RGBSet
Cores FastLED HSV
Matemática de Alto Desempenho
Notas de poder
Funções de onda FastLED
Limitações da plataforma
Problemas de interrupção
Notas ESP8266
Saída paralela
Referências
Design FastLED
Correção de cores FastLED
Pontilhamento Temporal FastLED
Hardware SPI ou Batida de bits
Exemplos
Calibração RGB
Exemplos de controladores múltiplos
Melhor das discussões do FastLED
Referência da API
Referência de chipset
Novos recursos do FastLED3.1
Lançamentos
Anúncio FastLED-3.0 - página de lançamento 3.0

Clone este wiki localmente

https://github.com/FastLED/FastLED.wiki.git

https://github.com/FastLED/FastLED/wiki/Pixel-reference 30/30

You might also like