06-29-2022, 03:35 AM
(This post was last modified: 06-30-2022, 01:26 PM by James D Jarvis.)
CMYK or process color is the model used in print. I spent years doing print work and just find it easier to mix colors using that color model.
Each color is expressed as a % of Cyan C, Magenta M, Yellow Y, and Black K
White is 0,0,0,0
Red is 0,100,80,0 to 0,100,100,0
Greys are 0,0,0,1 to 99 or C,M & Y set to the same value from 1 to 99
Each color is expressed as a % of Cyan C, Magenta M, Yellow Y, and Black K
White is 0,0,0,0
Red is 0,100,80,0 to 0,100,100,0
Greys are 0,0,0,1 to 99 or C,M & Y set to the same value from 1 to 99
Code: (Select All)
Screen _NewImage(640, 480, 32)
Color _RGB32(0, 0, 0), _RGB32(255, 255, 255)
Cls
'a simple demo of the color values
Do
Print "Enter C,M,Y,K"
Input c, m, y, k
k& = cmyk~&(c, m, y, k)
Line (200, 200)-(400, 400), k&, BF
Loop Until c = -100
Function cmyk~& (c As Long, m As Long, y As Long, k As Long)
' CMYK process color Cyan, Magenta, Yellow, Black each expressed as a percent from 0 to 100
r = 255 * (100 - c)
r = (r / 100) * ((100 - k) / 100)
g = 255 * (100 - m)
g = (g / 100) * ((100 - k) / 100)
b = 255 * (100 - y)
b = (b / 100) * ((100 - k) / 100)
cmyk~& = _RGB32(r, g, b)
End Function