Being a web designer / web developer, you are faced with the task of translating designs a graphic designer's has created for a project you are working on into code. Since this is not a task of just eyeballing what you see and making visual approximations, you sometimes have to dive deep into some tools that you do not normally work with to complete the task.
Say you are tasked with taking the following design and making a webpage with the exact same colours and it is presented to you as a power point design.
Assuming basic html knowledge, the following is a basic html template with bootstrap included as well as a custom css file where we will edit the colours
If you open the index.html file in a browser immediately after adding the above template it will contain a basic white block , but that certainly wont make the designer happy.
What we want is the block to to look just as it did in the design as far as the gradient is concerned, and we cannot simply take an eye measurement. Fortunately we know about https://cssgradient.io/. Visiting the website we see the following.
Css gradient is a visual tool that allows to us to convert RGB values into css code that we can use in our css file. All that is need now is to find the exact RGB values sent over by the designer in the power point file. Here is how . .
Follow these steps in order:
1. Select the shape you want to extract colours from.
2. Above the toolbar to the right find and click on "Shape Format"
3. In the toolbar section on the far end click on "Format Pane"
4. Under the the tab "Shape options " expand the section "Fill" and select the "Gradient fill" radio button if not already selected
5. Still under "Gradient options" , locate "Gradient stops", click on the first gradient stop and the click the colour bucket next to the "Colour" heading
6. Click on more colours
You will end up with the following window
In https://cssgradient.io/ copy the the RGB values over from power point as well as the opacity value and map it to the corresponding gradient stop.
Do the same for the second gradient stop, steps (5 - 6 ) above and you should end up with something like this in https://cssgradient.io/
the exact same gradient as in the design. However what we are really interested in is the css part at the bottom.
Copy it into your clipboard and paste into your main.css file under the ".card" class which is the same class that references the white block we currently have in our html file.Here is the result . .
Strictly Necessary Cookies
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
3rd Party Cookies
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!