
Retrieve Colors from a CLC Style Definition
Source:R/clc.R, R/clc_category.R, R/clc_raster.R
get_colors.RdThis function extracts the color values associated with a CLC style definition. It returns a character vector containing the `color` field from the CLC style definition.
Usage
# S3 method for class 'clc'
get_colors(clo)
get_colors(clo)
# S3 method for class 'clc_category'
get_colors(clo)
# S3 method for class 'clc_raster'
get_colors(clo)See also
Other CLC class functions:
as_raster(),
clc(),
copy_to(),
cut_to_extent(),
get_levels.clc(),
get_raster(),
plot_clc(),
prepare_plot(),
save_to()
Examples
source_gpkg <- system.file("extdata", "clc.gpkg", package = "clc")
clo <- clc(source = source_gpkg, layer_name = "clc")
levels <- clo |>
get_colors()