top of page

RGB och HSB (HSV) - Härledning av ekvationer

Sida: 1   â€‹â€‹2   â€‹â€‹3   â€‹â€‹4   â€‹â€‹5   â€‹â€‹6   â€‹â€‹7   â€‹â€‹8

33.jpg

1. Proportionalitet mellan RGB-färger.

Step 1 & 2. Determination of point C by using point A as a starting point.

To predict point C from point A, a combination of equations 3 and 7 is required. 

12.jpg
4.jpg
5.jpg

STEP 3. CALCULATION OF HUE 

6.jpg
7.jpg

Alternative 1. To calculate Hue with RGB:

8.jpg

Alternative 2. To calculate how to predict point C via point A in RGB format:

9.jpg
2.jpg

This formula refers to the Preucil hue error and grayness system (I960).

7.jpg

1. Proportionalitet mellan RGB-färger.

If moving circularly - Two-dimensional plane:

(A) M – m, (B) M – IM, (C) IM - m remains constant over the entire distance.

1b.jpg
11 copy.jpg

How to Draw: linearizing the curve (color placement)

3.jpg

By using photoshop: Opacity and Fill considered equal.
(Opacity = Fill) < 100%

CONVERSION FROM RGB TO HSB

12 copy.jpg
13 copy.jpg

CALCULATION OF RGB IM (S:1, B:1):

The range (M – m) of point A predicts saturation at point B and brightness at point C.

2.jpg

 Alternative.1 (B pathway): To predict point D via point A 

14 copy.jpg

 Alternative.2 (C pathway): To predict point D via point A 

15 copy.jpg
20.jpg

1. Proportionalitet mellan RGB-färger.

14.jpg

STEP 1: FINDING POINT A (RGB (S1, B1)) VIA HUE

Hue ↔ IM (S∶1, B:1)

- Hue is used to calculate the IM (S∶1, B:1) and vice versa:
- The designation S1, B1 means that the saturation and brightness of this color are 100%.

Eq. 17 & 18: 

- RGB min (S1, B1) and RGB max (S1, B1) are always 0 and 1, while RGB intermediate varies. Eqs. 17 and 18 use hue to calculate IM (S1, B1).

8.jpg
21.jpg

STEP 2 & 3: MOVING FROM POINT A TO POINT C 

Combination of eq: 3 and 7. 

18 copy.jpg
19 copy.jpg

A similar formula has been mentioned by George H. Joblove and Donald Greenberg (1978) [link].

CALCULATION OF RGB MAX

21 copy.jpg
15.jpg

CALCULATION OF RGB INTERMEDIATE – SLOPE UP 

Alternative.1

28 copy.jpg

Alternative.2

27 copy.jpg
23.jpg

When moving vertically, the saturation is unchanged:

S (Initial) = S (Final) 

31 copy.jpg

 When moving horizontally, the brightness is unchanged:

B (Initial) = B (Final)

30 copy.jpg

CALCULATION OF RGB INTERMEDIATE – SLOPE DOWN 

Alternative.1

32 copy.jpg

Alternative.2

33.jpg
24.jpg

When moving vertically, the saturation is unchanged:

S (Initial) = S (Final) 

36 copy.jpg

 When moving horizontally, the brightness is unchanged:

B (Initial) = B (Final)

35 copy.jpg

CALCULATION OF RGB MIN

23 copy.jpg
25.jpg

When moving vertically, the saturation is unchanged:  

54.jpg

 When moving horizontally, the brightness is unchanged:

55.jpg

References:

[1]  George H. J & Green, Donald.,1978. Color spaces for computer graphics. Program of Computer Graphics. 12, pp. 23 

[2] Preucii, F. (i960), "Color Diagram," TAGA Proc., 12, pp. 151 – 155.

RGB och HSB (HSV) - Härledning av ekvationer

Sida: 1   â€‹â€‹2   â€‹â€‹3   â€‹â€‹4   â€‹â€‹5   â€‹â€‹6   â€‹â€‹7   â€‹â€‹8

bottom of page