Create font format
create_font(
b = "",
charset = "",
color = wb_color(hex = "FF000000"),
condense = "",
extend = "",
family = "2",
i = "",
name = "Aptos Narrow",
outline = "",
scheme = "minor",
shadow = "",
strike = "",
sz = "11",
u = "",
vert_align = "",
...
)
bold
charset
rgb color: default "FF000000"
condense
extend
font family: default "2"
italic
font name: default "Aptos Narrow"
outline
font scheme: default "minor"
shadow
strike
font size: default "11",
underline
vertical alignment
...
wb_add_font()
Other style creating functions:
create_border()
,
create_cell_style()
,
create_colors_xml()
,
create_dxfs_style()
,
create_fill()
,
create_numfmt()
,
create_tablestyle()
font <- create_font()
# openxml has the alpha value leading
hex8 <- unlist(xml_attr(read_xml(font), "font", "color"))
hex8 <- paste0("#", substr(hex8, 3, 8), substr(hex8, 1, 2))
# # write test color
# col <- crayon::make_style(col2rgb(hex8, alpha = TRUE))
# cat(col("Test"))
Run the code above in your browser using DataLab