Skip to content

Support RGB, hex values, and add known colours to DC Webmail Notifier#6

Open
Aupajo wants to merge 1 commit intoperryn:masterfrom
Aupajo:webmail-notifier-improvements
Open

Support RGB, hex values, and add known colours to DC Webmail Notifier#6
Aupajo wants to merge 1 commit intoperryn:masterfrom
Aupajo:webmail-notifier-improvements

Conversation

@Aupajo
Copy link

@Aupajo Aupajo commented Dec 26, 2013

This PR:

  • Renames send to send_data, to avoid overriding Ruby's core send method.
  • Adds a colour_rgb! method (usage: colour_rgb!(255, 0, 255))
  • Adds a colour_hex! method (usage: colour_hex!("00ff00"))
  • Adds methods for the following colours: black, white, green, red, blue, orange, teal, yellow, pink
  • Does not break the existing WebmailNotifier API (all methods before this change are still supported)

@perryn
Copy link
Owner

perryn commented Jan 8, 2014

Hi there

Thanks for sending a pull request!

However, I'm not sure why you want to add methods that allow client code to set colour directly? Generally in blinky CI plugins call methods like (failure!, success!, warning!, etc) and it is up to the light plugin implementation to map that to a colour (or whatever). Why did you find these colour methods useful?

@Aupajo
Copy link
Author

Aupajo commented Jan 8, 2014

Oh, I'm not using this library for CI. I'm using it as a general-purpose indicator.

I've written a game using it, which flashes between colours, and a colour picker that you can choose to set the colour of the light to any hex value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants