Skip to content

Commit 27263cf

Browse files
committed
[feat] Add aliases for British spelling of colour
- Introduced 'colourblind_pal' as an alias for 'colorblind_pal'. - Added 'scale_colour_colourblind' and 'scale_fill_colourblind' functions to complement existing colorblind scales. From #180 Authored by @hangonasecond
1 parent 3ed1490 commit 27263cf

3 files changed

Lines changed: 20 additions & 4 deletions

File tree

NAMESPACE

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export(canva_pal)
1010
export(circlefill_shape_pal)
1111
export(cleveland_shape_pal)
1212
export(colorblind_pal)
13+
export(colourblind_pal)
1314
export(economist_pal)
1415
export(excel_new_pal)
1516
export(excel_pal)
@@ -26,7 +27,6 @@ export(palette_pander)
2627
export(ptol_pal)
2728
export(scale_color_calc)
2829
export(scale_color_canva)
29-
export(scale_color_colorblind)
3030
export(scale_color_continuous_tableau)
3131
export(scale_color_economist)
3232
export(scale_color_excel)
@@ -46,6 +46,7 @@ export(scale_color_wsj)
4646
export(scale_colour_calc)
4747
export(scale_colour_canva)
4848
export(scale_colour_colorblind)
49+
export(scale_colour_colourblind)
4950
export(scale_colour_economist)
5051
export(scale_colour_excel)
5152
export(scale_colour_excel_new)
@@ -64,6 +65,7 @@ export(scale_colour_wsj)
6465
export(scale_fill_calc)
6566
export(scale_fill_canva)
6667
export(scale_fill_colorblind)
68+
export(scale_fill_colourblind)
6769
export(scale_fill_continuous_tableau)
6870
export(scale_fill_economist)
6971
export(scale_fill_excel)

R/colorblind.R

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ colorblind_pal <- function() {
2121
f
2222
}
2323

24+
#' @rdname colorblind
25+
#' @export
26+
colourblind_pal <- colorblind_pal
27+
2428
#' @rdname colorblind
2529
#' @export
2630
scale_colour_colorblind <- function(...) {
@@ -29,10 +33,14 @@ scale_colour_colorblind <- function(...) {
2933

3034
#' @rdname colorblind
3135
#' @export
32-
scale_color_colorblind <- scale_colour_colorblind
36+
scale_colour_colourblind <- scale_colour_colorblind
3337

3438
#' @rdname colorblind
3539
#' @export
3640
scale_fill_colorblind <- function(...) {
3741
discrete_scale("fill", palette = colorblind_pal(), ...)
3842
}
43+
44+
#' @rdname colorblind
45+
#' @export
46+
scale_fill_colourblind <- scale_fill_colorblind

man/colorblind.Rd

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)