Skip to content
Commit 1db51e85 authored by Rohit Kaushik's avatar Rohit Kaushik Committed by Georges Basile Stavracas Neto
Browse files

todoist: Add auxiliary methods for color conversion

Since Todoist uses an integer mapped to hex code for list color,
but To Do uses GdkRGBA we need function that will do the necessary
conversion from one to other.
This patch add following method:
  1)convert_color_code: This converts todoist supported int code to
    To Do  supported GdkRGBA color.

  2)get_color_code_index: This returns index for To Do supported GdkRGBA
    color which maps correctly to todoist color codes (hex).

  3)optimized_eucledian_color_distance: Required by 2nd method to find
    To Do color closed to todoist predifined color codes.

https://bugzilla.gnome.org/show_bug.cgi?id=772278
parent 338707ac
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