
Ways to Change Vector Data Style and Color
What you'll learn
- How to change the style (color) of vector data in QGIS
- The differences between Single Symbol, Categorized, and Graduated styling, and how to use each
- How to color features based on attribute data
Recommended for
- Anyone who wants to change the colors of vector data
- Anyone who wants to create maps that are easy to read at a glance, based on the attributes of vector data
Introduction
QGIS offers a wide range of features for making maps, including styling (changing colors) and labeling for both vector and raster data.
Styling vector data in particular is an important feature for making a map more visually effective and conveying information accurately. This article introduces the basics of styling vector data in QGIS.
Change the style of a vector layer
To change the style of vector data in QGIS, open the layer properties.
Right-click the layer and select Properties. You can also double-click the layer to open the same dialog.

Next, select the Symbology tab on the left. You can make all the style settings for a vector layer from this tab.

You can also change the style without opening the layer properties, by using the Layer Styling panel.
Select the layer in the Layers panel, then click the Open the Layer Styling panel button at the top of the panel.

The Layer Styling panel opens on the right side of the window.

The layer properties and the Layer Styling panel offer essentially the same functions, but the Layer Styling panel applies your settings in real time, which makes it well suited to fine adjustments.
Basic way to change colors
The most basic style for vector data is Single Symbol styling.
With this method, all features are drawn in the same style (color and symbol). It works well when you want to keep the map simple or do not need to emphasize differences in attributes.
When you add a layer to QGIS, it uses Single Symbol by default. You can confirm this in the drop-down at the top, which is set to Single Symbol.

Now change the style of the layer.
Below the Single Symbol drop-down, under Fill, select Simple Fill. The settings change to show the options for the fill color and the stroke (outline) color of the layer.

Change the fill color to gray and the stroke color to white.
First, click the ▼ drop-down arrow next to Fill color. A color picker opens in the center. Inside its triangle is a circle marker. Drag the circle toward gray.
When you have the color you want, click inside the layer properties to close the color picker.

Repeat the same steps: click the ▼ drop-down arrow next to Stroke color, and this time set the color to white.

When you finish changing the colors, click the OK button at the bottom.

Check the map canvas.
The administrative area polygon layer now uses the colors you set above.

Change colors based on attribute data
One of the most useful things about GIS is that you can change the color of shapes based on the attributes of vector data.
For example, if you color administrative areas by the population or population density in their data, you can see at a glance which areas have many people and which have few. Coloring by attribute data such as numbers and place names lets you grasp information visually on the map, which makes data analysis and comparison easier.

When you style by attribute values, the data type of the attribute matters.
If an attribute looks like a number but its data type is text (string), you cannot select it in Graduated, which is described below. Watch the data type.
Style by categorical attribute data
To color features by categorical attribute data, use Categorized.
This method assigns a different color or symbol to each attribute value. For example, you can color land use data by category, such as residential, commercial, and agricultural areas.
The administrative area data used here is polygon data created at the municipality level. In the attribute table, the nam field stores text that identifies the prefecture.

Now set up the coloring based on this field.
In the layer properties, select the Symbology tab, then select Categorized from the drop-down at the top. Next, click the ▼ drop-down arrow next to Value and select nam, the attribute to color by.

With the value selected, click the Classify button at the bottom. The table in the middle now shows colors assigned according to the values of the nam field.

If the settings look right, click the OK button at the bottom to close the layer properties. On the map canvas, the administrative area polygons are now colored by prefecture.

To style features based on categorized attribute data like this, select Categorized.
Style by continuous numeric attribute data
To show continuous numeric data visually on a map, color features with Graduated. This lets you display values from low to high as a gradient of colors.
For example, on a hazard map showing flood depth, using light colors for shallow flooded areas and dark colors for deep ones makes the flood risk intuitive to read. Similarly, to show harvest volume for each farmland parcel, using light colors for low-yield parcels and reddish colors for high-yield ones makes it easy to see the yield of each parcel visually.
This kind of styling visualizes differences in values on the map, which makes data trends and risk distributions easier to understand.
This example uses airport point data. The attribute table of the airport data has a numeric field, zv3, that stores the elevation of the area where each airport is located.

Now use the zv3 field to color the features with Graduated.
In the layer properties, select the Symbology tab, then select Graduated from the drop-down at the top. Next, click the ▼ drop-down arrow next to Value and select zv3, the attribute to color by.

With the value selected, click the Classify button at the bottom. The table in the middle now shows value ranges based on the population values, with the matching gradient colors, all set automatically.

You can also customize the colors as needed. By default, the gradient runs from red to white, but you can change it to other colors by clicking the ▼ drop-down arrow next to Color ramp.

To change how the values are classified, use the Mode and Classes settings.

Check that the color ranges and steps are set appropriately. When you are done, click the OK button at the bottom to close the layer properties.
On the map canvas, the airport points are now colored according to elevation.

Coloring by a continuous attribute lets you see visually which features are at high or low elevations.
QGIS offers many style settings for vector data. To make a printable map, however, you will also need text (labels) on the map, a legend, a north arrow, and so on. Those features are covered in a separate article.
Conclusion
This article explained the basic operations for styling vector data in QGIS. Beyond the style settings covered here, you can customize much more, such as fine-tuning styles or styling by condition.
Use the styling features of QGIS to make your map designs even richer.


QGIS LAB is a comprehensive information hub for QGIS, the open-source GIS software. Under the concept of “Geospatial for Greater Good,” we share the knowledge and skills to open up the world through location data.


