MyNixOS website logo
Description

Extract Color Palettes from Photos and Pick Official LTER Palettes.

Allows identification of palettes derived from LTER (Long Term Ecological Research) photographs based on user criteria. Also facilitates extraction of palettes from users' photos directly.

lterpalettefinder - Extract Color Palettes from Photos and Pick Official LTER Palettes

R-CMD-check GitHub lastcommit GitHubissues GitHub pullrequests

The goal of lterpalettefinder is to provide high quality color palettes derived from photos at Long Term Ecological Research (LTER) sites. This allows users to create beautiful graphics that have close visual ties to photos from the places where data were collected. This package also allows users to generate their own palettes from any photo (PNG, JPEG, TIFF, or HEIC) if the current palettes in the function do not meet their needs. For more information on the LTER Network, check out our website!

Installation

You can install the development version of lterpalettefinder from GitHub with:

# install.packages("devtools")
devtools::install_github("lter/lterpalettefinder")

R Shiny App

To help demonstrate some of the functionalities of lterpalettefinder we have created a standalone R Shiny app that allows for extracting a palette and demonstrating it entirely through a browser. While we developed this app primarily to support non-R users interested in lterpalettefinder we hope it is interesting and valuable to R experts as well! The GitHub repo for the Shiny app can be found here.

Functions

This package currently includes the following functions:

Use an Existing Palette

  • palette_find returns “official” palette(s) that we have already created that meet criteria you specify

Create Your Own Palette

  • palette_extract extracts 25 colors’ hexadecimal codes from a picture of your choosing (PNG, JPEG, TIFF, and HEIC formats are currently supported)

  • palette_sort sorts output of palette_extract by hue and saturation to approximate how human eyes group colors

  • palette_subsample randomly picks a user-specified number of hexadecimal codes from a vector of such codes

Demonstrate a Palette

  • palette_demo creates an exploratory base R graph from a vector of hexadecimal codes (like that returned by either palette_extract, ..._sort, or ..._subsample) and provides an option to export that plot if desired

  • palette_ggdemo creates an exploratory ggplot2 graph from a vector of hexadecimal codes (like that returned by either palette_extract, ..._sort, or ..._subsample)

Note that the vector of hexadecimal codes provided by palette_find when only one official palette meets criteria set by user will also be accepted by either palette_demo or ...ggdemo

Acknowledgements

Creation of this package was funded by National Science Foundation grant #1929393 awarded to F. Davis, J. Caselle, and M. Downs.

Gabriel De La Rosa designed our hex logo and provided valuable feedback on early versions of the package.

Thanks also to the whole LTER Network Office team and the broader NCEAS community!

Palette Examples

These palette examples were generated from photos at LTER sites.

Santa Barbara Coastal LTER + palette_demo

ImagePalette
Photo credit: SBC LTER

Arctic LTER + palette_ggdemo

ImagePalette
Photo credit: Lindsay VanFossen

Kellogg Biological Station LTER + palette_demo

ImagePalette.
Photo credit: G.P. Robertson
Metadata

Version

1.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows