Search

style() | Deeper Insight into Notion Formula

post type
notion
formula
status
published
author
created time
2024/03/14 13:50
3 more properties
Hey guys, welcome to my blog :)
The style() is a new addition that came with Notion's Formula 2.0 update. You can access it if you're using Notion version 3.0. In this blog, we will explore the Notion formula style(). This formula is a versatile tool that adds styles and colors to your text, providing you with complete control over how your text appears.
code index code Database Database property Name of the property Database view Menu Options

Summary

Name
Description
How it works
Example
style
Adds styles and colors to the text in the database Valid formatting styles: "b" (bold), "u" (underline), "i" (italics), "c" (code), or "s" (strikethrough). Valid colors: "gray", "brown", "orange", "yellow", "green", "blue", "purple", "pink", and "red". Add "_background" to colors to set background colors.
style(value, style_1, style_2, …., style_n)
style("Notion", "b", "u") = "Notion" style("Notion", "blue") = "Notion"

style() Formula

The style() adds styles and colors to the text in the database

How style() works

Here's how you would write the if statement in Notion: style(value, style_1, style_2, …., style_n)
The style formula accepts several parameters: 'value', which represents the text you want to format. You can directly input the text into the formula field, like "Example", or it can be a Text property. In that case, input it as prop("Example"), assuming "Example" is a text property.
The following style_1, style_2, …., style_n are the style formatting options you can apply.
Formatting Style
Output
"b"
Bold text
"u"
Underlined text
"i"
Italic text
"c"
Code text
"s"
Strikethrough text
Formatting Style
Output
"gray"
Gray text
"brown"
Brown text
"orange"
Orange text
"yellow"
Yellow text
"green"
Green text
"blue"
Blue text
"purple"
Purple text
"pink"
Pink text
"red"
Red text
"color_background"
Background color (replace 'color' with any valid color name in the above options)

Example of style()

Let's look at a couple of examples to understand how the style formula works.
Search
name
example
formula
notionwithro
style("notionwithro", "green", "s")
notionwithro
style("notionwithro", "b", "blue", "red_background")
notionwithro
style("notionwithro", "i", "purple")
notionwithro
style("notionwithro", "yellow", "c", "red_background")

conclusion

Thank you for reading this tutorial! If you found it helpful, be sure to check out shop for my beautiful templates, which I am confident enough to say are a game-changer Subscribe to my newsletter and feel free to follow me on my social media for updates!
Happy Notion(ing)!