Compare commits

..

No commits in common. "master" and "v0.10.27" have entirely different histories.

4 changed files with 135 additions and 176 deletions

View File

@ -23,7 +23,7 @@ typedef struct
version CINERA_APP_VERSION = { version CINERA_APP_VERSION = {
.Major = 0, .Major = 0,
.Minor = 10, .Minor = 10,
.Patch = 30 .Patch = 27
}; };
#define __USE_XOPEN2K8 // NOTE(matt): O_NOFOLLOW #define __USE_XOPEN2K8 // NOTE(matt): O_NOFOLLOW
@ -903,8 +903,8 @@ FreeBook(memory_book *M)
void void
FreeAndReinitialiseBook(memory_book *M) FreeAndReinitialiseBook(memory_book *M)
{ {
uint64_t PageSize = M->PageSize; int PageSize = M->PageSize;
uint64_t DataWidthInBytes = M->DataWidthInBytes; int DataWidthInBytes = M->DataWidthInBytes;
FreeBook(M); FreeBook(M);
@ -4172,68 +4172,6 @@ LogEdit(edit_type_id EditType, string Lineage, string EntryID, string *EntryTitl
} }
} }
#define CINERA_HSL_TRANSPARENT_HUE 65535
typedef struct
{
unsigned int Hue:16;
unsigned int Saturation:8;
unsigned int Lightness:8;
} hsl_colour;
hsl_colour
CharToColour(char Char)
{
hsl_colour Colour;
if(Char >= 'a' && Char <= 'z')
{
Colour.Hue = (((float)Char - 'a') / ('z' - 'a') * 360);
Colour.Saturation = (((float)Char - 'a') / ('z' - 'a') * 26 + 74);
}
else if(Char >= 'A' && Char <= 'Z')
{
Colour.Hue = (((float)Char - 'A') / ('Z' - 'A') * 360);
Colour.Saturation = (((float)Char - 'A') / ('Z' - 'A') * 26 + 74);
}
else if(Char >= '0' && Char <= '9')
{
Colour.Hue = (((float)Char - '0') / ('9' - '0') * 360);
Colour.Saturation = (((float)Char - '0') / ('9' - '0') * 26 + 74);
}
else
{
Colour.Hue = 180;
Colour.Saturation = 50;
}
return Colour;
}
void
StringToColourHash(hsl_colour *Colour, string String)
{
Colour->Hue = 0;
Colour->Saturation = 0;
Colour->Lightness = 74;
for(int i = 0; i < String.Length; ++i)
{
Colour->Hue += CharToColour(String.Base[i]).Hue;
Colour->Saturation += CharToColour(String.Base[i]).Saturation;
}
Colour->Hue = Colour->Hue % 360;
Colour->Saturation = Colour->Saturation % 26 + 74;
}
bool
IsValidHSLColour(hsl_colour Colour)
{
return (Colour.Hue >= 0 && Colour.Hue < 360)
&& (Colour.Saturation >= 0 && Colour.Saturation <= 100)
&& (Colour.Lightness >= 0 && Colour.Lightness <= 100);
}
#define SLASH 1 #define SLASH 1
#define NULLTERM 1 #define NULLTERM 1
typedef struct typedef struct
@ -4388,7 +4326,6 @@ typedef struct
{ {
string Marker; string Marker;
string WrittenText; string WrittenText;
hsl_colour Colour;
} category_info; } category_info;
#define CopyString(Dest, DestSize, Format, ...) CopyString_(__LINE__, (Dest), (DestSize), (Format), ##__VA_ARGS__) #define CopyString(Dest, DestSize, Format, ...) CopyString_(__LINE__, (Dest), (DestSize), (Format), ##__VA_ARGS__)
@ -4783,16 +4720,18 @@ typedef struct
bool Resolving; bool Resolving;
} clash_resolver; } clash_resolver;
void clash_resolver
InitClashResolver(clash_resolver *ClashResolver) InitClashResolver(void)
{ {
ClashResolver->Book[0] = InitBook(sizeof(clash_entry), 8); clash_resolver Result = {};
ClashResolver->Book[1] = InitBook(sizeof(clash_entry), 8); Result.Book[0] = InitBook(sizeof(clash_entry), 8);
ClashResolver->Main = &ClashResolver->Book[0]; Result.Book[1] = InitBook(sizeof(clash_entry), 8);
ClashResolver->Holder = &ClashResolver->Book[1]; Result.Main = &Result.Book[0];
ClashResolver->Chain = InitBookOfPointers(8); Result.Holder = &Result.Book[1];
ClashResolver->ChainStructure = CS_OPEN_ENDED; Result.Chain = InitBookOfPointers(8);
ClashResolver->Resolving = FALSE; Result.ChainStructure = CS_OPEN_ENDED;
Result.Resolving = FALSE;
return Result;
} }
void void
@ -5542,6 +5481,58 @@ TimecodeToDottedSeconds(v4 Timecode)
return (float)Timecode.Hours * SECONDS_PER_HOUR + (float)Timecode.Minutes * SECONDS_PER_MINUTE + (float)Timecode.Seconds + (float)Timecode.Milliseconds / 1000; return (float)Timecode.Hours * SECONDS_PER_HOUR + (float)Timecode.Minutes * SECONDS_PER_MINUTE + (float)Timecode.Seconds + (float)Timecode.Milliseconds / 1000;
} }
typedef struct
{
unsigned int Hue:16;
unsigned int Saturation:8;
unsigned int Lightness:8;
} hsl_colour;
hsl_colour
CharToColour(char Char)
{
hsl_colour Colour;
if(Char >= 'a' && Char <= 'z')
{
Colour.Hue = (((float)Char - 'a') / ('z' - 'a') * 360);
Colour.Saturation = (((float)Char - 'a') / ('z' - 'a') * 26 + 74);
}
else if(Char >= 'A' && Char <= 'Z')
{
Colour.Hue = (((float)Char - 'A') / ('Z' - 'A') * 360);
Colour.Saturation = (((float)Char - 'A') / ('Z' - 'A') * 26 + 74);
}
else if(Char >= '0' && Char <= '9')
{
Colour.Hue = (((float)Char - '0') / ('9' - '0') * 360);
Colour.Saturation = (((float)Char - '0') / ('9' - '0') * 26 + 74);
}
else
{
Colour.Hue = 180;
Colour.Saturation = 50;
}
return Colour;
}
void
StringToColourHash(hsl_colour *Colour, string String)
{
Colour->Hue = 0;
Colour->Saturation = 0;
Colour->Lightness = 74;
for(int i = 0; i < String.Length; ++i)
{
Colour->Hue += CharToColour(String.Base[i]).Hue;
Colour->Saturation += CharToColour(String.Base[i]).Saturation;
}
Colour->Hue = Colour->Hue % 360;
Colour->Saturation = Colour->Saturation % 26 + 74;
}
char * char *
SanitisePunctuation(char *String) SanitisePunctuation(char *String)
{ {
@ -8111,7 +8102,7 @@ BuildCredits(string HMMLFilepath, buffer *CreditsMenu, HMML_VideoMetaData *Metad
} }
void void
InsertCategory(_memory_book(category_info) *GlobalTopics, _memory_book(category_info) *LocalTopics, _memory_book(category_info) *GlobalMedia, _memory_book(category_info) *LocalMedia, string Marker, hsl_colour *Colour) InsertCategory(_memory_book(category_info) *GlobalTopics, _memory_book(category_info) *LocalTopics, _memory_book(category_info) *GlobalMedia, _memory_book(category_info) *LocalMedia, string Marker)
{ {
medium *Medium = GetMediumFromProject(CurrentProject, Marker); medium *Medium = GetMediumFromProject(CurrentProject, Marker);
@ -8212,15 +8203,11 @@ InsertCategory(_memory_book(category_info) *GlobalTopics, _memory_book(category_
{ {
category_info *Src = GetPlaceInBook(LocalTopics, CategoryCount - 1); category_info *Src = GetPlaceInBook(LocalTopics, CategoryCount - 1);
category_info *Dest = GetPlaceInBook(LocalTopics, CategoryCount); category_info *Dest = GetPlaceInBook(LocalTopics, CategoryCount);
*Dest = *Src; Dest->Marker = Src->Marker;
} }
category_info *New = GetPlaceInBook(LocalTopics, CategoryCount); category_info *New = GetPlaceInBook(LocalTopics, CategoryCount);
New->Marker = Marker; New->Marker = Marker;
if(Colour)
{
New->Colour = *Colour;
}
break; break;
} }
} }
@ -8231,10 +8218,6 @@ InsertCategory(_memory_book(category_info) *GlobalTopics, _memory_book(category_
{ {
category_info *New = GetPlaceInBook(LocalTopics, TopicIndex); category_info *New = GetPlaceInBook(LocalTopics, TopicIndex);
New->Marker = Marker; New->Marker = Marker;
if(Colour)
{
New->Colour = *Colour;
}
} }
bool MadeGlobalSpace = FALSE; bool MadeGlobalSpace = FALSE;
@ -8258,15 +8241,11 @@ InsertCategory(_memory_book(category_info) *GlobalTopics, _memory_book(category_
{ {
category_info *Src = GetPlaceInBook(GlobalTopics, CategoryCount - 1); category_info *Src = GetPlaceInBook(GlobalTopics, CategoryCount - 1);
category_info *Dest = GetPlaceInBook(GlobalTopics, CategoryCount); category_info *Dest = GetPlaceInBook(GlobalTopics, CategoryCount);
*Dest = *Src; Dest->Marker = Src->Marker;
} }
category_info *New = GetPlaceInBook(GlobalTopics, CategoryCount); category_info *New = GetPlaceInBook(GlobalTopics, CategoryCount);
New->Marker = Marker; New->Marker = Marker;
if(Colour)
{
New->Colour = *Colour;
}
break; break;
} }
} }
@ -8278,10 +8257,6 @@ InsertCategory(_memory_book(category_info) *GlobalTopics, _memory_book(category_
{ {
category_info *New = GetPlaceInBook(GlobalTopics, TopicIndex); category_info *New = GetPlaceInBook(GlobalTopics, TopicIndex);
New->Marker = Marker; New->Marker = Marker;
if(Colour)
{
New->Colour = *Colour;
}
} }
} }
} }
@ -8373,18 +8348,9 @@ BuildCategoryIcons(buffer *CategoryIcons, _memory_book(category_info) *LocalTopi
CopyString(SanitisedMarker, sizeof(SanitisedMarker), "%.*s", (int)This->Marker.Length, This->Marker.Base); CopyString(SanitisedMarker, sizeof(SanitisedMarker), "%.*s", (int)This->Marker.Length, This->Marker.Base);
SanitisePunctuation(SanitisedMarker); SanitisePunctuation(SanitisedMarker);
CopyStringToBuffer(CategoryIcons, CopyStringToBuffer(CategoryIcons, "<div title=\"%.*s\" class=\"category %s\"></div>",
"<div title=\"%.*s\" class=\"category %s\"",
(int)This->Marker.Length, This->Marker.Base, (int)This->Marker.Length, This->Marker.Base,
SanitisedMarker); SanitisedMarker);
if(IsValidHSLColour(This->Colour))
{
CopyStringToBuffer(CategoryIcons,
" data-hue=\"%u\" data-saturation=\"%u%%\"",
This->Colour.Hue, This->Colour.Saturation);
}
CopyStringToBuffer(CategoryIcons,
"></div>");
} }
} }
@ -8664,7 +8630,7 @@ BuildQuote(memory_book *Strings, quote_info *Info, string Speaker, int ID, bool
} }
rc rc
GenerateTopicColours(neighbourhood *N, string Topic, hsl_colour *Dest) GenerateTopicColours(neighbourhood *N, string Topic)
{ {
rc Result = RC_SUCCESS; rc Result = RC_SUCCESS;
// NOTE(matt): Stack-string // NOTE(matt): Stack-string
@ -8675,15 +8641,6 @@ GenerateTopicColours(neighbourhood *N, string Topic, hsl_colour *Dest)
medium *Medium = GetMediumFromProject(CurrentProject, Topic); medium *Medium = GetMediumFromProject(CurrentProject, Topic);
if(!Medium) if(!Medium)
{ {
if(StringsMatch(Topic, Wrap0("nullTopic")))
{
Dest->Hue = CINERA_HSL_TRANSPARENT_HUE;
}
else
{
StringToColourHash(Dest, Topic);
}
file Topics = {}; file Topics = {};
Topics.Path = 0; Topics.Path = 0;
Topics.Buffer.ID = BID_TOPICS; Topics.Buffer.ID = BID_TOPICS;
@ -8749,8 +8706,10 @@ GenerateTopicColours(neighbourhood *N, string Topic, hsl_colour *Dest)
} }
else else
{ {
hsl_colour Colour;
StringToColourHash(&Colour, Topic);
WriteToFile(Topics.Handle, ".category.%s { border: 1px solid hsl(%d, %d%%, %d%%); background: hsl(%d, %d%%, %d%%); }\n", WriteToFile(Topics.Handle, ".category.%s { border: 1px solid hsl(%d, %d%%, %d%%); background: hsl(%d, %d%%, %d%%); }\n",
SanitisedTopic, Dest->Hue, Dest->Saturation, Dest->Lightness, Dest->Hue, Dest->Saturation, Dest->Lightness); SanitisedTopic, Colour.Hue, Colour.Saturation, Colour.Lightness, Colour.Hue, Colour.Saturation, Colour.Lightness);
} }
#if DEBUG_MEM #if DEBUG_MEM
@ -10940,7 +10899,7 @@ ProcessTimestamp(buffers *CollationBuffers, neighbourhood *N, string Filepath, m
{ {
*HasFilterMenu = TRUE; *HasFilterMenu = TRUE;
} }
InsertCategory(Topics, &LocalTopics, Media, &LocalMedia, Wrap0("authored"), NULL); InsertCategory(Topics, &LocalTopics, Media, &LocalMedia, Wrap0("authored"));
hsl_colour AuthorColour; hsl_colour AuthorColour;
StringToColourHash(&AuthorColour, Author); StringToColourHash(&AuthorColour, Author);
// TODO(matt): That EDITION_NETWORK site database API-polling stuff // TODO(matt): That EDITION_NETWORK site database API-polling stuff
@ -10965,15 +10924,14 @@ ProcessTimestamp(buffers *CollationBuffers, neighbourhood *N, string Filepath, m
HMML_MarkerType Type = Timestamp->markers[MarkerIndex].type; HMML_MarkerType Type = Timestamp->markers[MarkerIndex].type;
if(Type == HMML_CATEGORY) if(Type == HMML_CATEGORY)
{ {
hsl_colour TopicColour = {}; Result = GenerateTopicColours(N, Wrap0(Timestamp->markers[MarkerIndex].marker));
Result = GenerateTopicColours(N, Wrap0(Timestamp->markers[MarkerIndex].marker), &TopicColour);
if(Result == RC_SUCCESS) if(Result == RC_SUCCESS)
{ {
if(!*HasFilterMenu) if(!*HasFilterMenu)
{ {
*HasFilterMenu = TRUE; *HasFilterMenu = TRUE;
} }
InsertCategory(Topics, &LocalTopics, Media, &LocalMedia, Wrap0(Timestamp->markers[MarkerIndex].marker), &TopicColour); InsertCategory(Topics, &LocalTopics, Media, &LocalMedia, Wrap0(Timestamp->markers[MarkerIndex].marker));
CopyStringToBuffer(&IndexBuffers->Text, "%.*s", (int)StringLength(Readable), InPtr); CopyStringToBuffer(&IndexBuffers->Text, "%.*s", (int)StringLength(Readable), InPtr);
} }
else else
@ -11204,15 +11162,14 @@ ProcessTimestamp(buffers *CollationBuffers, neighbourhood *N, string Filepath, m
while(MarkerIndex < Timestamp->marker_count) while(MarkerIndex < Timestamp->marker_count)
{ {
hsl_colour TopicColour = {}; Result = GenerateTopicColours(N, Wrap0(Timestamp->markers[MarkerIndex].marker));
Result = GenerateTopicColours(N, Wrap0(Timestamp->markers[MarkerIndex].marker), &TopicColour);
if(Result == RC_SUCCESS) if(Result == RC_SUCCESS)
{ {
if(!*HasFilterMenu) if(!*HasFilterMenu)
{ {
*HasFilterMenu = TRUE; *HasFilterMenu = TRUE;
} }
InsertCategory(Topics, &LocalTopics, Media, &LocalMedia, Wrap0(Timestamp->markers[MarkerIndex].marker), &TopicColour); InsertCategory(Topics, &LocalTopics, Media, &LocalMedia, Wrap0(Timestamp->markers[MarkerIndex].marker));
++MarkerIndex; ++MarkerIndex;
} }
else else
@ -11225,11 +11182,10 @@ ProcessTimestamp(buffers *CollationBuffers, neighbourhood *N, string Filepath, m
{ {
if(LocalTopics.ItemCount == 0) if(LocalTopics.ItemCount == 0)
{ {
hsl_colour TopicColour = {}; Result = GenerateTopicColours(N, Wrap0("nullTopic"));
Result = GenerateTopicColours(N, Wrap0("nullTopic"), &TopicColour);
if(Result == RC_SUCCESS) if(Result == RC_SUCCESS)
{ {
InsertCategory(Topics, &LocalTopics, Media, &LocalMedia, Wrap0("nullTopic"), &TopicColour); InsertCategory(Topics, &LocalTopics, Media, &LocalMedia, Wrap0("nullTopic"));
} }
} }
@ -11237,7 +11193,7 @@ ProcessTimestamp(buffers *CollationBuffers, neighbourhood *N, string Filepath, m
{ {
if(LocalMedia.ItemCount == 0) if(LocalMedia.ItemCount == 0)
{ {
InsertCategory(Topics, &LocalTopics, Media, &LocalMedia, DefaultMedium->ID, NULL); InsertCategory(Topics, &LocalTopics, Media, &LocalMedia, DefaultMedium->ID);
} }
BuildTimestampClass(&IndexBuffers->Class, &LocalTopics, &LocalMedia, DefaultMedium->ID); BuildTimestampClass(&IndexBuffers->Class, &LocalTopics, &LocalMedia, DefaultMedium->ID);
@ -12036,20 +11992,12 @@ HMMLToBuffers(buffers *CollationBuffers, template *BespokeTemplate, string BaseF
bool NullTopic = StringsMatch(This->Marker, Wrap0("nullTopic")); bool NullTopic = StringsMatch(This->Marker, Wrap0("nullTopic"));
CopyStringToBuffer(&MenuBuffers.FilterTopics, CopyStringToBuffer(&MenuBuffers.FilterTopics,
" <div %sclass=\"filter_content %s\">\n" " <div %sclass=\"filter_content %s\">\n"
" <span class=\"icon category %s\"", " <span class=\"icon category %s\"></span><span class=\"cineraText\">%.*s</span>\n"
" </div>\n",
NullTopic ? "title=\"Timestamps that don't fit into the above topic(s) may be filtered using this pseudo-topic\" " : "", NullTopic ? "title=\"Timestamps that don't fit into the above topic(s) may be filtered using this pseudo-topic\" " : "",
SanitisedMarker, SanitisedMarker,
SanitisedMarker); SanitisedMarker,
if(IsValidHSLColour(This->Colour))
{
CopyStringToBuffer(&MenuBuffers.FilterTopics,
" data-hue=\"%u\" data-saturation=\"%u%%\"",
This->Colour.Hue, This->Colour.Saturation);
}
CopyStringToBuffer(&MenuBuffers.FilterTopics,
"></span><span class=\"cineraText\">%.*s</span>\n"
" </div>\n",
NullTopic ? (int)sizeof("(null topic)")-1 : (int)This->Marker.Length, NullTopic ? (int)sizeof("(null topic)")-1 : (int)This->Marker.Length,
NullTopic ? "(null topic)" : This->Marker.Base); NullTopic ? "(null topic)" : This->Marker.Base);
} }
@ -18323,8 +18271,7 @@ main(int ArgC, char **Args)
CollationBuffers.Search.ID = BID_COLLATION_BUFFERS_SEARCH; // NOTE(matt): Allocated by SearchToBuffer() CollationBuffers.Search.ID = BID_COLLATION_BUFFERS_SEARCH; // NOTE(matt): Allocated by SearchToBuffer()
memory_book TokensList = InitBook(sizeof(tokens), 8); memory_book TokensList = InitBook(sizeof(tokens), 8);
clash_resolver ClashResolver = {}; clash_resolver ClashResolver = InitClashResolver();
InitClashResolver(&ClashResolver);
template BespokeTemplate = {}; template BespokeTemplate = {};
neighbourhood Neighbourhood = {}; neighbourhood Neighbourhood = {};

View File

@ -65,12 +65,3 @@ document.addEventListener("keydown", function(ev) {
ev.preventDefault(); ev.preventDefault();
} }
}); });
document.addEventListener("fullscreenchange", function() {
if(!document.fullscreenElement && CineraProps.V == views.SUPERTHEATRE)
{
CineraProps.V = views.THEATRE;
localStorage.setItem(player.cineraViewStorageItem, views.THEATRE);
player.updateSize();
}
});

View File

@ -1554,11 +1554,10 @@ Player.prototype.updateLink = function()
} break; } break;
case vod_platform.VIMEO: case vod_platform.VIMEO:
{ {
var Parent = this;
this.platformPlayer.getCurrentTime() this.platformPlayer.getCurrentTime()
.then(function(Response) .then(function(Response)
{ {
Parent.link.value = baseURL + "#" + Math.round(Response); this.link.value = baseURL + "#" + Math.round(Response);
}); });
} break; } break;
case vod_platform.YOUTUBE: case vod_platform.YOUTUBE:
@ -1631,7 +1630,6 @@ Player.prototype.toggleMenuVisibility = function(MenuID, Trigger) {
if(element.classList.contains("visible")) if(element.classList.contains("visible"))
{ {
HideMenu(element); HideMenu(element);
this.MenusFocused.MenuID = menu_id.UNSET;
if(Trigger == trigger_id.KEYBOARD && this.Menus[menu_id.MARKERS].Item.LastFocused) if(Trigger == trigger_id.KEYBOARD && this.Menus[menu_id.MARKERS].Item.LastFocused)
{ {

View File

@ -551,6 +551,35 @@ BindHelp(Button, DocumentationContainer)
}) })
} }
function RGBtoHSL(colour)
{
var rgb = colour.slice(4, -1).split(", ");
var red = rgb[0];
var green = rgb[1];
var blue = rgb[2];
var min = Math.min(red, green, blue);
var max = Math.max(red, green, blue);
var chroma = max - min;
var hue = 0;
if(max == red)
{
hue = ((green - blue) / chroma) % 6;
}
else if(max == green)
{
hue = ((blue - red) / chroma) + 2;
}
else if(max == blue)
{
hue = ((red - green) / chroma) + 4;
}
var saturation = chroma / 255 * 100;
hue = (hue * 60) < 0 ? 360 + (hue * 60) : (hue * 60);
return [hue, saturation]
}
function getBackgroundColourRGB(element) { function getBackgroundColourRGB(element) {
var Colour = getComputedStyle(element).getPropertyValue("background-color"); var Colour = getComputedStyle(element).getPropertyValue("background-color");
var depth = 0; var depth = 0;
@ -581,8 +610,6 @@ function setTextLightness(textElement)
{ {
var textHue = textElement.getAttribute("data-hue"); var textHue = textElement.getAttribute("data-hue");
var textSaturation = textElement.getAttribute("data-saturation"); var textSaturation = textElement.getAttribute("data-saturation");
if(textHue && textSaturation)
{
if(getBackgroundBrightness(textElement.parentNode) < 127) if(getBackgroundBrightness(textElement.parentNode) < 127)
{ {
textElement.style.color = ("hsl(" + textHue + ", " + textSaturation + ", 76%)"); textElement.style.color = ("hsl(" + textHue + ", " + textSaturation + ", 76%)");
@ -592,23 +619,19 @@ function setTextLightness(textElement)
textElement.style.color = ("hsl(" + textHue + ", " + textSaturation + ", 24%)"); textElement.style.color = ("hsl(" + textHue + ", " + textSaturation + ", 24%)");
} }
} }
}
function setDotLightness(topicDot) function setDotLightness(topicDot)
{ {
var dotHue = topicDot.getAttribute("data-hue"); var Hue = RGBtoHSL(getComputedStyle(topicDot).getPropertyValue("background-color"))[0];
var dotSaturation = topicDot.getAttribute("data-saturation"); var Saturation = RGBtoHSL(getComputedStyle(topicDot).getPropertyValue("background-color"))[1];
if(dotHue && dotSaturation)
{
if(getBackgroundBrightness(topicDot.parentNode) < 127) if(getBackgroundBrightness(topicDot.parentNode) < 127)
{ {
topicDot.style.backgroundColor = ("hsl(" + dotHue + ", " + dotSaturation + ", 76%)"); topicDot.style.backgroundColor = ("hsl(" + Hue + ", " + Saturation + "%, 76%)");
topicDot.style.borderColor = ("hsl(" + dotHue + ", " + dotSaturation + ", 76%)"); topicDot.style.borderColor = ("hsl(" + Hue + ", " + Saturation + "%, 76%)");
} }
else else
{ {
topicDot.style.backgroundColor = ("hsl(" + dotHue + ", " + dotSaturation + ", 47%)"); topicDot.style.backgroundColor = ("hsl(" + Hue + ", " + Saturation + "%, 47%)");
topicDot.style.borderColor = ("hsl(" + dotHue + ", " + dotSaturation + ", 47%)"); topicDot.style.borderColor = ("hsl(" + Hue + ", " + Saturation + "%, 47%)");
}
} }
} }