diff --git a/posts/table-body-custom-palette/20250225.qmd b/posts/table-body-custom-palette/20250225.qmd index 20e4b75..c525d62 100644 --- a/posts/table-body-custom-palette/20250225.qmd +++ b/posts/table-body-custom-palette/20250225.qmd @@ -59,7 +59,7 @@ In cases where colors need to be determined dynamically based on conditions, the def color_selector(df_): return df_["col1"].case_when( [ - (df_["col1"].lt(3), "lightgray"), # <3 + (df_["col1"].lt(3), "lightgrey"), # <3 (df_["col1"].lt(10), "papayawhip"), # <10 (df_["col1"].ge(10), "lightblue"), # >=10 ] @@ -114,7 +114,7 @@ Alternatively, if you prefer sticking with the same approach, `pd.Series.case_wh def color_selector(df_): return df_["col2"].case_when( [ - (df_["col2"].eq("x"), "lightgray"), + (df_["col2"].eq("x"), "lightgrey"), (df_["col2"].eq("y"), "papayawhip"), (df_["col2"].eq("z"), "lightblue"), ] @@ -168,7 +168,7 @@ For cases where colors need to be assigned dynamically, [pl.when()](https://docs # | eval : False color_selector_expr = ( pl.when(pl.col("col1").lt(3)) # <3 - .then(pl.lit("lightgray")) + .then(pl.lit("lightgrey")) .when(pl.col("col1").lt(10)) # <10 .then(pl.lit("papayawhip")) .when(pl.col("col1").ge(10)) # >=10 @@ -203,7 +203,7 @@ Alternatively, if you prefer the conditional approach, `pl.when()` can still be # | eval : False color_selector_expr = ( pl.when(pl.col("col2").eq(pl.lit("x"))) - .then(pl.lit("lightgray")) + .then(pl.lit("lightgrey")) .when(pl.col("col2").eq(pl.lit("y"))) .then(pl.lit("papayawhip")) .when(pl.col("col2").eq(pl.lit("z")))