Topic: Colour wheels (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=32393" title="Pages that link to Topic: Colour wheels (Page 1 of 1)" rel="nofollow" >Topic: Colour wheels <span class="small">(Page 1 of 1)</span>\

 
mahjqa
Maniac (V) Mad Scientist

From: The Demented Side of the Fence
Insane since: Aug 2000

IP logged posted posted 10-09-2011 16:45 Edit Quote



'lo everyone. I started myself a new education (Communication & multimedia design) and one of the first assignments I got was to build a color wheel, and use it to illustrate what primary, secondary and tertiary colors are. The example given used the standard primary colors: Red, yellow and blue. (As seen on the right)

I went a different way, and started with Cyan, Magenta and Yellow as primary colors, since that makes a bit more sense when you're dealing with printing and so on.

So, is either one of them better? How would I find the right CMYK values for the colour wheel on the right?

Thanks for your time.

Tyberius Prime
Maniac (V) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

IP logged posted posted 10-11-2011 09:49 Edit Quote

Good for you .

I like yours much better - it's a bit less prone to crosstalk between the colors.
Might wish to use a greyish background though?

And I have no clue if there's an easy way to read cymk from the right one...

so long,

->Tyberius Prime

Arthurio
Paranoid (IV) Inmate

From: cell 3736
Insane since: Jul 2003

IP logged posted posted 10-17-2011 09:12 Edit Quote
code:
function rgb2cmyk (r,g,b) {
 var computedC = 0;
 var computedM = 0;
 var computedY = 0;
 var computedK = 0;

 //remove spaces from input RGB values, convert to int
 var r = parseInt( (''+r).replace(/\s/g,''),10 ); 
 var g = parseInt( (''+g).replace(/\s/g,''),10 ); 
 var b = parseInt( (''+b).replace(/\s/g,''),10 ); 

 if ( r==null || g==null || b==null ||
     isNaN(r) || isNaN(g)|| isNaN(b) )
 {
   alert ('Please enter numeric RGB values!');
   return;
 }
 if (r<0 || g<0 || b<0 || r>255 || g>255 || b>255) {
   alert ('RGB values must be in the range 0 to 255.');
   return;
 }

 // BLACK
 if (r==0 && g==0 && b==0) {
  computedK = 1;
  return [0,0,0,1];
 }

 computedC = 1 - (r/255);
 computedM = 1 - (g/255);
 computedY = 1 - (b/255);

 var minCMY = Math.min(computedC,
              Math.min(computedM,computedY));
 computedC = (computedC - minCMY) / (1 - minCMY) ;
 computedM = (computedM - minCMY) / (1 - minCMY) ;
 computedY = (computedY - minCMY) / (1 - minCMY) ;
 computedK = minCMY;

 return [computedC,computedM,computedY,computedK];
}



http://www.javascripter.net/faq/rgb2cmyk.htm



Post Reply
 
Your User Name:
Your Password:
Login Options: Remember Me On This Computer
 
Your Text:
Loading...
Options: Show Signature
Enable Slimies
Enable Linkwords

« BackwardsOnwards »

Show Forum Drop Down Menu