Commit f6449cdd authored by Dorian's avatar Dorian

Bug fix on color

parent 4102d587
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="f1355e25-8de7-478f-b9df-4b57ba58a977" name="Default Changelist" comment=""> <list default="true" id="f1355e25-8de7-478f-b9df-4b57ba58a977" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/Functions - Q2.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/Functions - Q2.py" beforeDir="false" afterPath="$PROJECT_DIR$/Functions - Q2.py" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Generator - Q2.py" afterDir="false" />
</list> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
...@@ -17,7 +16,7 @@ ...@@ -17,7 +16,7 @@
<entry file="file://$PROJECT_DIR$/Generator - Q2.py"> <entry file="file://$PROJECT_DIR$/Generator - Q2.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="631"> <state relative-caret-position="631">
<caret line="206" column="29" lean-forward="true" selection-start-line="206" selection-start-column="29" selection-end-line="206" selection-end-column="29" /> <caret line="206" column="29" selection-start-line="206" selection-start-column="29" selection-end-line="206" selection-end-column="29" />
<folding> <folding>
<element signature="e#0#10#0" expanded="true" /> <element signature="e#0#10#0" expanded="true" />
</folding> </folding>
...@@ -28,8 +27,8 @@ ...@@ -28,8 +27,8 @@
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/Functions - Q2.py"> <entry file="file://$PROJECT_DIR$/Functions - Q2.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180"> <state relative-caret-position="195">
<caret line="13" column="13" selection-start-line="13" selection-start-column="8" selection-end-line="13" selection-end-column="13" /> <caret line="79" column="72" selection-end-line="346" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
<element signature="e#2574#3874#1" /> <element signature="e#2574#3874#1" />
...@@ -117,6 +116,7 @@ ...@@ -117,6 +116,7 @@
</panes> </panes>
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" /> <property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="node.js.detected.package.eslint" value="true" /> <property name="node.js.detected.package.eslint" value="true" />
...@@ -155,12 +155,12 @@ ...@@ -155,12 +155,12 @@
<updated>1561208892308</updated> <updated>1561208892308</updated>
<workItem from="1561208902383" duration="5452000" /> <workItem from="1561208902383" duration="5452000" />
<workItem from="1561217649259" duration="20292000" /> <workItem from="1561217649259" duration="20292000" />
<workItem from="1561284256791" duration="18760000" /> <workItem from="1561284256791" duration="20809000" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="44504000" /> <option name="totallyTimeSpent" value="46553000" />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="0" y="29" width="1366" height="739" extended-state="6" /> <frame x="0" y="29" width="1366" height="739" extended-state="6" />
...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
<entry file="file://$PROJECT_DIR$/Generator - Q2.py"> <entry file="file://$PROJECT_DIR$/Generator - Q2.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="631"> <state relative-caret-position="631">
<caret line="206" column="29" lean-forward="true" selection-start-line="206" selection-start-column="29" selection-end-line="206" selection-end-column="29" /> <caret line="206" column="29" selection-start-line="206" selection-start-column="29" selection-end-line="206" selection-end-column="29" />
<folding> <folding>
<element signature="e#0#10#0" expanded="true" /> <element signature="e#0#10#0" expanded="true" />
</folding> </folding>
...@@ -222,8 +222,8 @@ ...@@ -222,8 +222,8 @@
</entry> </entry>
<entry file="file://$PROJECT_DIR$/Functions - Q2.py"> <entry file="file://$PROJECT_DIR$/Functions - Q2.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180"> <state relative-caret-position="195">
<caret line="13" column="13" selection-start-line="13" selection-start-column="8" selection-end-line="13" selection-end-column="13" /> <caret line="79" column="72" selection-end-line="346" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
<element signature="e#2574#3874#1" /> <element signature="e#2574#3874#1" />
......
...@@ -73,8 +73,12 @@ def getColorsRanges(min, max, mean, parts) : # renvoie liste de [Valeur [Rouge, ...@@ -73,8 +73,12 @@ def getColorsRanges(min, max, mean, parts) : # renvoie liste de [Valeur [Rouge,
for i in range(parts) : for i in range(parts) :
oneColor = [0, [0, 0, 0]] # [Valeur [Rouge, Vert, Bleu]] oneColor = [0, [0, 0, 0]] # [Valeur [Rouge, Vert, Bleu]]
oneColor[0] = colorValues[i] oneColor[0] = colorValues[i]
oneColor[1][0] = 1.0 - (i / (parts-1)) # Rouge if (i < parts / 2) :
oneColor[1][1] = i / (parts - 1) # Vert oneColor[1][0] = 1.0 # Rouge
oneColor[1][1] = i / (parts / 2) # Vert
else :
oneColor[1][0] = 1.0 - ((i - parts / 2) / (parts-1)) # Rouge
oneColor[1][1] = 1.0 # Vert
colorRanges.append(oneColor) colorRanges.append(oneColor)
return colorRanges return colorRanges
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment