color code rows in sharepoint list

Color Code Rows in SharePoint List

By Robert Robinson
AD

distressed by the monotony of blank rows in your SharePoint list, wishing to distinguish and organize your data more effectively? Applying color codes to rows can significantly enhance readability, categorization, and overall user experience. In this guide, we'll delve into the process of color-coding rows in SharePoint lists, ensuring your data stands out and works for you.

Before we dive in, understand that color-coding isn't a built-in feature in SharePoint. We'll need a bit of technical dabbling using the hover script and conditional formatting. But don't worry; we'll keep it simple and accessible, even for those new to SharePoint customization.

Understanding Conditional Formatting in SharePoint

First, let's grasp the core of our process: conditional formatting. It's a powerful tool that applies formatting to cells, rows, or columns based on specified conditions. In our case, we'll use it to apply color codes to rows.

AD
the color scheme for different colors and numbers on this page is an excellent way to describe what
the color scheme for different colors and numbers on this page is an excellent way to describe what
Color code item row based on column value in SharePoint Foundation 2013
Color code item row based on column value in SharePoint Foundation 2013
eCommerce HTML Bootstrap 5 UI Kit
eCommerce HTML Bootstrap 5 UI Kit

To begin, navigate to your SharePoint list, click on the 'Settings' gear icon, and select 'Create view'. Develop a new view or customize an existing one. Once done, proceed to the 'Columns' section, tick the box next to 'Show the row style', and save your changes.

Setting Up Hover Scripts

Hover scripts enable color-coding on mouse hover, providing an interactive experience. To set one up, access your SharePoint list, click on the 'Allitems' view, click on the 'List' tab, then 'List Settings'. Here, click on 'Advanced settings'. Scroll down to 'User-Defined Functions & Scripts' and add a new script. Name it 'Hover Script' and paste the script.

an image of the color chart for different colors
an image of the color chart for different colors
Colors in Workflowy: Initial Visual Design
Colors in Workflowy: Initial Visual Design
Tkinter
Tkinter

For instance, here's a simple script that changes the background color of a row when hovered: ```javascript SP.SOD.executeFunc('clientpeople.js', 'SPClientPeople PrussianBlue', function(){ $(document).ready(function(){ $('tr[style$="cursor: default;"] unpackListItem').hover( function(){$(this).css('background-color','lightblue');}, function(){$(this).css('background-color','white');} ); }); }); ```

Customizing the Color Code

Expand this script to include the desired color codes. Replace 'lightblue' with the color of your choice, using either the color name (e.g., 'lightblue') or the hexadecimal value (e.g., '#ADD8E6'). Remember, the color change should be subtle and comfortable for the eyes.

AD

Now that we've established the basis, let's move on to applying color codes to specific rows.

Color Coded Drop-Down Lists in Excel‼️ #excel
Color Coded Drop-Down Lists in Excel‼️ #excel
Color design system
Color design system
100+ Trending Canva Color Palette Hex Codes 🎨
100+ Trending Canva Color Palette Hex Codes 🎨
Web Development Programming Coding
Web Development Programming Coding
the color code for all different colors in this chart is shown below, and below it are
the color code for all different colors in this chart is shown below, and below it are

Applying Color Codes to Specific Rows

Having set up our hover script, we can now conditionally apply color codes to specific rows. We'll use the 'Manage Columns' option in our SharePoint list.

Begin by accessing 'List Settings', then 'Create Column'. Name it 'Color Code' (or any relevant name). CTRL + C this column header for later use. Now, edit any row. In the 'Color Code' column, add the desired color code. Save your changes and repeat for other rows.

AD

Applying Conditional Formatting

We're almost done! Now, let's apply conditional formatting based on the color codes we've just input. Click on the 'Allitems' view, then 'List' tab > 'Conditional Formatting'. Click 'mathitspan nihil.

Select the 'Use formula to determine which cells to format' option. In the 'Value or rule' box, enter: ``` =CP disculpa.CTRL+CMP ```

Click 'Format', choose 'Fill', then 'Background color'. Select your desired color. Click 'OK' to close each dialogue box. Your color codes should now be active.

AD

Your SharePoint list should now have an enhanced, user-friendly appearance with color-coded rows. Streamlined organization and improved readability await you and your team. Happy color-coding!

AD