ian-cox / Kirby-Color-Picker

A simple color picker field for the Kirby CMS
MIT License
86 stars 13 forks source link

Default color option in blueprint #1

Closed ian-cox closed 9 years ago

ian-cox commented 9 years ago

I would like to add the option to specify a default color in the blueprint.

crispconcepts commented 9 years ago

Does this not work for you? It seems to be working fine for my fork (with spectrum.js).

  color:
    label: Color
    type:  color
    default: rgb(255,255,255)
ian-cox commented 9 years ago

Interesting, I tried that and when I tested it, I don't remember it working. Maybe I was sloppy with my blueprint file. I'll try it out again.

ian-cox commented 9 years ago

Yeah, unfortunately that doesn't seem to work for me

crispconcepts commented 9 years ago

I think I see the issue. Try removing the # before the hex value.

  color:
    label: Color
    type:  color
    default: 078cbe

Also make sure that the content file doesn't have anything saved already for this. I tested it on a new page to be sure.

ian-cox commented 9 years ago

Yeah, the # doesn't seem to be parsing properly in the yaml. I'm making some progress but it's not working just yet. I'll report back.

ian-cox commented 9 years ago

Got it! will be pushing an update shortly.

ian-cox commented 9 years ago

Just added default color functionality! The new update addresses this issue and is documented in the readme file.