ben-eb / postcss-color-yiq

Set foreground text color based on the YIQ color space.
MIT License
14 stars 1 forks source link

Allow for custom "white" and "black" colors #1

Closed VinSpee closed 8 years ago

VinSpee commented 8 years ago

It'd be awesome to be able to specify custom colors for "white" and "black", for instance:

postcss().use(yiq({
    darkColor: "#222222",
    lightColor: "#efefef"
  }))

then, possibly after that, It would be great to actually find the real contrast ratio between the custom colors and the background, and choose correctly.

Any thoughts on something like this?

ben-eb commented 8 years ago

Sure, this looks like low hanging fruit to me. PR welcome. :smile:

VinSpee commented 8 years ago

Will do - it will be my first whack at a PostCSS plugin code base - will require a close review :-)

(null)

On Wed, Oct 7, 2015 at 12:38 PM, Ben Briggs notifications@github.com wrote:

Sure, this looks like low hanging fruit to me. PR welcome. :smile:

Reply to this email directly or view it on GitHub: https://github.com/ben-eb/postcss-color-yiq/issues/1#issuecomment-146256599

ben-eb commented 8 years ago

Fixed in https://github.com/ben-eb/postcss-color-yiq/commit/6621e21d34f24ab982ccadb88fcaa81a783ecc2c.