All Projects โ†’ EmilHvitfeldt โ†’ quickpalette

EmilHvitfeldt / quickpalette

Licence: Unknown, MIT licenses found Licenses found Unknown LICENSE MIT LICENSE.md
๐Ÿƒโ€โ™€๏ธ๐ŸŽจ R package for quick extraction of color palettes from text and images

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to quickpalette

Kallewheel
A custom color wheel extension for Adobe Photoshop
Stars: โœญ 16 (-33.33%)
Mutual labels:  color, color-palette
Iconhandler
Tint you Icons, change the size, apply alpha color and set a position easily. ๐Ÿ‘“
Stars: โœญ 59 (+145.83%)
Mutual labels:  color, color-palette
Leonardo
Generate colors based on a desired contrast ratio
Stars: โœญ 973 (+3954.17%)
Mutual labels:  color, color-palette
Pickr
๐ŸŽจ Flat, simple, multi-themed, responsive and hackable Color-Picker library. No dependencies, no jQuery. Compatible with all CSS Frameworks e.g. Bootstrap, Materialize. Supports alpha channel, rgba, hsla, hsva and more!
Stars: โœญ 3,759 (+15562.5%)
Mutual labels:  color, color-palette
react-native-image-color-picker
Image color picker based on image source provided and return image different color palettes or average color palette
Stars: โœญ 25 (+4.17%)
Mutual labels:  color, color-palette
Chromacolorpicker
๐ŸŽจ An intuitive iOS color picker built in Swift.
Stars: โœญ 434 (+1708.33%)
Mutual labels:  color, color-palette
Colorschemes.jl
colorschemes, colormaps, gradients, and palettes
Stars: โœญ 55 (+129.17%)
Mutual labels:  color, color-palette
NamedColors.jl
More color names than you ever knew you wanted
Stars: โœญ 24 (+0%)
Mutual labels:  color, color-palette
react-native-color-panel
React Native Color Panel Component for iOS and Android ๐Ÿณ๏ธโ€๐ŸŒˆ
Stars: โœญ 21 (-12.5%)
Mutual labels:  color, color-palette
Colors App
๐ŸŽจ A PWA for copying values from popular color palettes. Supports HEX, RGB, and HSL formats.
Stars: โœญ 90 (+275%)
Mutual labels:  color, color-palette
Colours
A beautiful set of predefined colors and a set of color methods to make your iOS/OSX development life easier.
Stars: โœญ 3,101 (+12820.83%)
Mutual labels:  color, color-palette
Colors.lol
๐ŸŽจ Overly descriptive color palettes
Stars: โœญ 207 (+762.5%)
Mutual labels:  color, color-palette
Colorpicker
jQuery UI widget for color picking (similar to the one in Microsoft Office 2010).
Stars: โœญ 271 (+1029.17%)
Mutual labels:  color, color-palette
R Color Palettes
Comprehensive list of color palettes available in r โค๏ธ๐Ÿงก๐Ÿ’›๐Ÿ’š๐Ÿ’™๐Ÿ’œ
Stars: โœญ 708 (+2850%)
Mutual labels:  color, color-palette
word-color
Finds colors associated with a word, basically https://picular.co/
Stars: โœญ 39 (+62.5%)
Mutual labels:  color, color-palette
Materialdesigncolor
This project shows the color in material design
Stars: โœญ 55 (+129.17%)
Mutual labels:  color, color-palette
javascript-color-gradient
Lightweight JavaScript library, used to generate an array of color gradients, between start and finish colors.
Stars: โœญ 54 (+125%)
Mutual labels:  color, color-palette
color-extractor
Biancoir is website that provide color extraction from an image with quantization algorithm.
Stars: โœญ 12 (-50%)
Mutual labels:  color, color-palette
Gvcci
color extraction to turn images into 16 color palettes
Stars: โœญ 86 (+258.33%)
Mutual labels:  color, color-palette
Colorbook
๐ŸŽจ Color schemes for UI design - Optimized for foreground, background, border, etc. https://liyasthomas.github.io/colorbook
Stars: โœญ 148 (+516.67%)
Mutual labels:  color, color-palette

quickpalette

Travis build status

The goal of quickpalette is to provide a few tools to quickly acquire new color palettes to be used in R.

Installation

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("EmilHvitfeldt/quickpalette")

Examples

regex_palette

Sometimes you see a color palette online and you want to use it in R, but it usually takes half a war to copy/paste in the individual hex values. The regex_palette function will try its best to extract a color palette from a string and return it, with the conventional leading #. Now you just copy-paste the whole thing into a string and run the function.

Example of websites where this function could be useful includes:

library(quickpalette)
test1 <- "
   shade 0 = #AA3939 = rgb(170, 57, 57) = rgba(170, 57, 57,1) = rgb0(0.667,0.224,0.224)
shade 1 = #FFAAAA = rgb(255,170,170) = rgba(255,170,170,1) = rgb0(1,0.667,0.667)
shade 2 = #D46A6A = rgb(212,106,106) = rgba(212,106,106,1) = rgb0(0.831,0.416,0.416)
shade 3 = #801515 = rgb(128, 21, 21) = rgba(128, 21, 21,1) = rgb0(0.502,0.082,0.082)
shade 4 = #550000 = rgb( 85,  0,  0) = rgba( 85,  0,  0,1) = rgb0(0.333,0,0)" 

test2 <- "
Color   Hex RGB
          #3b5998   (59,89,152)
          #8b9dc3   (139,157,195)
          #dfe3ee   (223,227,238)
          #f7f7f7   (247,247,247)
          #ffffff   (255,255,255)
          "

test3 <- "3b59988b9dc3dfe3eef7f7f7ffffff"

test4 <- "the palatte is #3472bc, #345682 then #112233 and finally #cbac43"

regex_palette(test1)
#> [1] "#AA3939" "#FFAAAA" "#D46A6A" "#801515" "#550000"
regex_palette(test2)
#> [1] "#3b5998" "#8b9dc3" "#dfe3ee" "#f7f7f7" "#ffffff"
regex_palette(test3)
#> [1] "#3b5998" "#8b9dc3" "#dfe3ee" "#f7f7f7" "#ffffff"
regex_palette(test4)
#> [1] "#3472bc" "#345682" "#112233" "#cbac43"

url_palette

Sometimes you come across a chart with a nifty looking color palettes, but the code have been left out for one reason or another. Normally you would have 2 choices, either go hunting to for the generating code in the hopes that you will be able to find the colors used or using you favorite color meter of choice you get each color individually.

Take this chart as an example, it has 5 different colors we would like to know.

Using the url_palette we we can copy url of the chart and extract the main colors using clustering algorithms. url_palette defaults to removing all grey scale pixels as they tend to not be of interest. It used a variation of Partitioning Around Medoids (PAM) clustering to ensure that the colors actually appeared in the image. Manual varying of the n_cluster argument is often necessary.

library(magrittr)
url <- "https://raw.githubusercontent.com/EmilHvitfeldt/quickpalette/master/man/figures/README-testchart-1.png"
url_palette(url, n_clusters = 5) %>%
  pals::pal.bands()

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].