The Color Picker is plain as black but I can pick the colour enter image description here

When the input field is clicked black screen appears

<!-- my static resource --> <ltng:require scripts="{!$Resource.jsColor + '/jscolor.js'}" /> <!--Code--> <div class="slds-form-element__control"> <input class=" slds-input form-control jscolor" style="{!'background-color:#'+v.mfColor}" id="mfClr" value="{!v.mfColor}" /> </div>

which is supposed to be like this

enter image description here

2 Answers 2


lightning:input might be a solution for you if you are in a lightning component:

<lightning:input type="color" label="Color" name="color" value="#EEEEEE"/>
  • really appreciate your help but my requirement is to be in JsColor, so can you help me with that?
    – SFDC
    Sep 28, 2017 at 5:34
  • hm nope sorry, might be a good question for stackoverflow if it's not related to salesforce.
    – itsmebasti
    Sep 28, 2017 at 9:16

This is somehow related to LockerService. If you change your API version to 39.0 then it will disable LockerService and work fine.

  • yeah so far now took the alternate way and done btw thanks for your update
    – SFDC
    Feb 19, 2018 at 6:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .