Scaling the Color Scale

Feel free to ask any question here
dcobra
Posts: 12
Joined: Thu Jan 28, 2021 3:37 pm

Re: Scaling the Color Scale

Post by dcobra »

I have had this problem as well and greatly appreciate the fix!
fuji1205
Posts: 12
Joined: Sat Dec 19, 2020 3:50 pm

Re: Scaling the Color Scale

Post by fuji1205 »

daniel wrote: Thu Aug 26, 2021 8:15 pm I have found the bug (and hopefully fixed it, you can try with the new 2.12.alpha version online).

And to create the color ramp you want (with the trick I suggest), with fixed color, you have to start with an absolute color scale and then:
1) reduce it to 2 steps
2) make sure the steps are above the maximum value you target (e.g. 1.0 and 2.0). And then:
3) select the first step, set the right color (the farthest), and edit its value to the minimum value (-0.01) then click somewhere else
4) click anywhere between the 2 steps, and edit the newly created step
5) set the color to the next segment color, and edit its value to something very close (-0.099) then click somewhere else
6) click anywhere between the 2 last steps, and edit the newly created step
7) set the same color and edit its value to the next intersection (-0.005) then click somewhere else
8) repeat from step 4
Appreciate for your help!
This is what I can do:
圖片 72.jpg
圖片 72.jpg (101.88 KiB) Viewed 2029 times
But may I set the color scale bar like this?
圖片 73.jpg
圖片 73.jpg (118.15 KiB) Viewed 2029 times
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Scaling the Color Scale

Post by daniel »

Here is what I was able to create:
colorscale.jpg
colorscale.jpg (55.58 KiB) Viewed 2013 times
Here is the XML file if you want to load it in CloudCompare (just save that in a file with '.xml' as extension):

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<CloudCompare>
    <ColorScale version="1">
        <Properties>
            <name>3mm BAR</name>
            <uuid>{bd7b4322-6026-4ec0-bbad-5ecf479d72d5}</uuid>
            <absolute>1</absolute>
            <minValue>-0.05</minValue>
            <range>0.1</range>
        </Properties>
        <Data>
            <step r="0" g="85" b="0" pos="0"/>
            <step r="0" g="85" b="0" pos="0.4399"/>
            <step r="0" g="145" b="90" pos="0.44"/>
            <step r="0" g="145" b="90" pos="0.4699"/>
            <step r="1" g="205" b="180" pos="0.47"/>
            <step r="1" g="205" b="180" pos="0.499"/>
            <step r="1" g="250" b="255" pos="0.5"/>
            <step r="1" g="250" b="255" pos="0.53"/>
            <step r="254" g="180" b="73" pos="0.5301"/>
            <step r="254" g="180" b="73" pos="0.56"/>
            <step r="255" g="91" b="164" pos="0.5601"/>
            <step r="255" g="91" b="164" pos="1"/>
            <label val="-0.05"/>
            <label val="-0.006"/>
            <label val="-0.003"/>
            <label val="0"/>
            <label val="0.003"/>
            <label val="0.006"/>
            <label val="0.05"/>
        </Data>
    </ColorScale>
</CloudCompare>
Daniel, CloudCompare admin
luca9801
Posts: 1
Joined: Fri Jun 14, 2024 8:32 am

Re: Scaling the Color Scale

Post by luca9801 »

Hello Daniel,
I tried to create a color scale like you did. But my color scale only changes the colors through the gradient.
How can I create a Color Scale withou the gradient.

Thank you.
Attachments
Bild1.png
Bild1.png (15.98 KiB) Viewed 1080 times
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Scaling the Color Scale

Post by daniel »

You have to create two 'steps' very close to each other (e.g. 1.0 and 1.0001)
Daniel, CloudCompare admin
Post Reply