Tutorial by Examples: color

Viridis (named after the chromis viridis fish) is a recently developed color scheme for the Python library matplotlib (the video presentation by the link explains how the color scheme was developed and what are its main advantages). It is seamlessly ported to R. There are 4 variants of color scheme...
ColorBrewer project is a very popular tool to select harmoniously matching color palettes. RColorBrewer is a port of the project for R and provides also colorblind-friendly palettes. An example of use colors_vec <- brewer.pal(5, name = 'BrBG') print(colors_vec) [1] "#A6611A" &quot...
Quite often there is a need to glimpse the chosen color palette. One elegant solution is the following self defined function: color_glimpse <- function(colors_string){ n <- length(colors_string) hist(1:n,breaks=0:n,col=colors_string) } An example of use color_glimpse(...
The package colorspace provides GUI for selecting a palette. On the call of choose_palette() function the following window pops-up: When the palette is chosen, just hit OK and do not forget to store the output in a variable, e.g. pal. pal <- choose_palette() The output is a function that t...
Function colors() lists all the color names that are recognized by R. There is a nice PDF where one can actually see those colors. colorRampPalette creates a function that interpolate a set of given colors to create new color palettes. This output function takes n (number) as input and produces a...
currentColor is most usefull in inline SVGs. With this you can inherit the parents css color and use it everywhere colors are used in SVG. In this example the first circle uses the text color as fill color, and the second circle uses it as the stroke color. <html> <head> ...
NSMutableAttributedString * string = [[NSMutableAttributedString alloc] initWithString:@"firstsecondthird"]; [string addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0,5)]; [string addAttribute:NSForegroundColorAttributeName value:[UIColor greenColo...
//fill column A with solid red color from hex worksheet.Column(1).Style.Fill.PatternType = ExcelFillStyle.Solid; worksheet.Column(1).Style.Fill.BackgroundColor.SetColor(ColorTranslator.FromHtml("#FF0000")); //fill row 4 with striped orange background worksheet.Row(4).Style.Fill.Patte...
// plugin initialization $.fn.greenify = function() { // within the function you can use any of the jQuery methods // and `this` context refers to jQuery object this.css( "color", "green" ); }; // apply plugin $( "a" ).greenify();
The color schemes changes the colors of the code. They can change, for example, with which color the keywords are highlighted, with which color the line the caret is on is highlighted (needs highlight_line to be set to true in the preferences (not part of the cojor scheme)), what is the color of the...
UITabBarController building in Swift 3 Change image color and title according to selection with changing selected tab color. import UIKit class TabbarController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() self.navigationController?.isNavigat...
Even though colorblind people can recognize a wide range of colors, it might be hard to differentiate between certain colors. RColorBrewer provides colorblind-friendly palettes: library(RColorBrewer) display.brewer.all(colorblindFriendly = T) The Color Universal Design from the University ...
The caret-color CSS property specifies the color of the caret, the visible indicator of the insertion point in an element where text and other content is inserted by the user's typing or editing. HTML <input id="example" /> CSS #example { caret-color: red; } Resources: ...
The code example below demonstrate how you can get a lighter and darker shade of a given color, useful in applications having dynamic themes For Darker Color + (UIColor *)darkerColorForColor:(UIColor *)c { CGFloat r, g, b, a; if ([c getRed:&r green:&g blue:&b alpha:&a]) ...
<!doctype html> <html> <head> <title>Page Title</title> <meta charset="UTF-8"> <meta name="viewport" content="initial-scale=1.0"> <script src="vue.js"></script> <style> ...
First step : PCL part public class RoundedBoxView : BoxView { public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create("CornerRadius", typeof(double), typeof(RoundedEntry), default(double)); public double CornerRadius { get...
public void setCardColorTran(CardView card) { ColorDrawable[] color = {new ColorDrawable(Color.BLUE), new ColorDrawable(Color.RED)}; TransitionDrawable trans = new TransitionDrawable(color); if(Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) { card.setB...
public void setCardColorTran(View view) { ColorDrawable[] color = {new ColorDrawable(Color.BLUE), new ColorDrawable(Color.RED)}; TransitionDrawable trans = new TransitionDrawable(color); if(Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) { view.setBackgrou...
Method: setSpanColor public Spanned setSpanColor(String string, int color){ SpannableStringBuilder builder = new SpannableStringBuilder(); SpannableString ss = new SpannableString(string); ss.setSpan(new ForegroundColorSpan(color), 0, string.length(), 0); builder.append(ss); ...
Some digital image processing algorithm such as edge detection, information carried by the image intensity (i.e. grayscale value) is sufficient. Using color information (R, G, B channel) may provides slightly better result, but the algorithm complexity will be increased. Thus, in this case, we need ...

Page 5 of 6