Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Problems with Color (non-numeric hex values) #2461

KorbinianMoser opened this Issue · 6 comments

3 participants


var test = new Color('#ccc');
console.log( test);

and all other hex values without numbers result in


I'm using current versions of core and more, the bug suddenly appeared in old (previously working) code. What's wrong?


I can't believe that I am the only one with that problem... seems like very basic mistake in the color translation to me.


Both new Color('#ccc') and #ccc'.hexToRgb() work fine for me. Which MooTools version are you using?


Hi Arian, thanks for your reply! It's
console.log( new Color('#ccc')); still outputs [NaN,NaN,NaN].
Maybe Google needs an update to the current version? Or doesn't my link get the current version from there?


Should work:

Google has the same MooTools Core version. Color however is in MooTools More. If you use More 1.4 it should just work.


Oh! Seems like one of my scripts crashed it!
Thanks for your help!

By the way: in Mootools.More Class.Refactor there should be a {} behind for (offset = 0; offset < baseDir.length && offset < relDir.length && baseDir[offset] == relDir[offset]; offset++), Google Closure Compiler always complains that.


Got it. I messed around with String.toInt, that caused the problem.

@ibolmo ibolmo closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.