You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vignettes/colours.Rmd
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -27,14 +27,14 @@ table_note <- paste(
27
27
28
28
afcharts provides colour palettes as set out by the [Government Analysis Function](https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-colours-in-charts/).
29
29
30
-
These palettes have been developed to meet the [Web Content Accessibility Guidelines 2.1 for graphical objects](https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html). The colours in the [main palette for categorical data](#main-palette) all have at least a 3:1 colour contrast ratio with white (#ffffff), as well as with adjacent colours in the palette.
30
+
These palettes have been developed to meet the [Web Content Accessibility Guidelines 2.1 for graphical objects](https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html). The colours in the [main palette for categorical data](#categorical-palette) all have at least a 3:1 colour contrast ratio with white (#ffffff), as well as with adjacent colours in the palette when used in the order recommended in the guidance.
31
31
32
32
33
33
## Things to consider when using colour
34
34
35
35
Using afcharts colour palettes does not guarantee that your charts will be accessible.
36
-
The [Government Analysis Function](https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-colours-in-charts/)has published guidance on other steps you should take to ensure the accessible use of colour.
37
-
afcharts should be used in conjunction with the advice given in these guidance documents.
36
+
The [Government Analysis Function](https://analysisfunction.civilservice.gov.uk) has published [guidance](https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-colours-in-charts/) on other steps you should take to help make the colours you use in data visualisations more accessible.
37
+
afcharts should be used in conjunction with this advice.
38
38
39
39
The following are a few key things to consider when using colour in data visualisations:
40
40
@@ -64,7 +64,7 @@ The `categorical` palette should be used with categorical data.
The `categorical2` palette should be used if only two colours are required as the dark blue and orange colours have the best colour contrast with each other.
67
+
The `categorical2` palette should be used if only two colours are required as the dark blue and orange colours have the greatest colour contrast with each other.
68
68
If only two colours are required the `categorical` family is requested, `categorical2` will be used instead.
69
69
70
70
`r table_note`
@@ -84,7 +84,7 @@ The `sequential` colour palette should be used for data where the order has some
As this palette is restricted to tints of one colour, there are issues with colour contrast.
87
+
As this palette is restricted to tints of one colour, colour contrast is not optimal.
88
88
Follow the [advice for using the sequential palette](https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-colours-in-charts/#section-6) in the Government Analysis Function colour guidance when using this palette.
89
89
90
90
@@ -113,7 +113,7 @@ An example of how to use an alternative colour palette is provided in the [cookb
113
113
However, if you use a different palette regularly and feel it would be useful for this to be added to afcharts, please make a suggestion as per the [contributing guidance](https://best-practice-and-impact.github.io/afcharts/CONTRIBUTING.html).
114
114
115
115
116
-
## Viewing Palettes in R
116
+
## Viewing palettes in R
117
117
118
118
Names and hex codes for available colours and palettes can be viewed by running the following code:
0 commit comments