(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
| CGContextRef ctx = UIGraphicsGetCurrentContext(); // your drawing context | |
| CGRect colorRect = CGRectMake(0, 0, 100, 100); // the rect to draw the color overlay into | |
| // Set the blend mode to "Normal" | |
| // This is the default blend mode setting so this line is not required, shown here for demonstration | |
| CGContextSetBlendMode(ctx, kCGBlendModeNormal); | |
| // Set the opacity of the drawing context (once again, not required) | |
| CGContextSetAlpha(ctx, 1.0); | |
| // Create the red color | |
| CGColorRef redColor = CGColorCreateGenericRGB(0.908, 0.149, 0.145, 1.000); | |
| // Set the fill color of the context and fill the rect |