3

I'm using a jquery plugin that seems to need the color in "000000" format but when I do this:

currentcolor = $("#" + dividediting).css("background-color");

I get the output as:

rgb(0,0,0)

I'm wondering if there is a way to change the way it outputs or if I have to use regex to parse the result to get it to the needed format.. thanks for any advice

1

1 Answer 1

3

This is the browser returning the parsed and processed colour value, it's got nothing to do with jQuery as such.

If you need to convert the value, see this question

rgb(x,z,y) is valid CSS as well, though.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.