HTML Color Flashcards

1
Q

HTML color

A

HTML colors are specified with predefined color names, or with RGB, HEX, HSL, RGBA, or HSLA values.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

color of text

A

<h1>Hello World</h1>

<p>Lorem ipsum...</p>

<p>Ut wisi enim...</p>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Border Color

A

<h1>Hello World</h1>

<h1>Hello World</h1>

<h1>Hello World</h1>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Color Values

A

colors can also be specified using RGB values, HEX values, HSL values, RGBA values, and HSLA values.

The following three <div> elements have their background color set with RGB, HEX, and HSL values:

rgb(255, 99, 71)
#ff6347
hsl(9, 100%, 64%)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Transparency of color

A

rgb(255, 99, 71, 0.5 for half)
hsl(9, 100%, 64%, 0.9) for 90%

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

rgb and rgba

A

An RGB color value represents RED, GREEN, and BLUE light sources.

An RGBA color value is an extension of RGB with an Alpha channel (opacity).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

parameter of rgb

A

Each parameter (red, green, and blue) defines the intensity of the color with a value between 0 and 255.

This means that there are 256 x 256 x 256 = 16777216 possible colors!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

rgb(255, 0, 0)

A

red

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

rgb(0, 255, 0)

A

green

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

rgb(0, 0, 255)

A

blue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

rgb(0, 0, 0)

A

Black

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

rgb(255, 255, 255)

A

White

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

rgba(red, green, blue, alpha)

A

alpha means 0 transparency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

HEX Color Values

A

rrggbb

Where rr (red), gg (green) and bb (blue) are hexadecimal values between 00 and ff (same as decimal 0-255).

For example, #ff0000 is displayed as red, because red is set to its highest value (ff), and the other two (green and blue) are set to 00.

Another example, #00ff00 is displayed as green, because green is set to its highest value (ff), and the other two (red and blue) are set to 00.

To display black, set all color parameters to 00, like this: #000000.

To display white, set all color parameters to ff, like this: #ffffff.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

HSL

A

HSL stands for hue, saturation, and lightness.

HSLA color values are an extension of HSL with an Alpha channel (opacity).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

HSL

A

Hue is a degree on the color wheel from 0 to 360. 0 is red, 120 is green, and 240 is blue.

Saturation is a percentage value. 0% means a shade of gray, and 100% is the full color.

Lightness is also a percentage value. 0% is black, and 100% is white.