diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php
index 7452918c7..2f2dd03d7 100644
--- a/views/bootstrap/class.Bootstrap.php
+++ b/views/bootstrap/class.Bootstrap.php
@@ -3499,7 +3499,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
if($categories = $document->getCategories()) {
$content .= "
";
foreach($categories as $category) {
- $color = substr(md5($category->getName()), 0, 6);
+ $color = $category->getColor() ? $category->getColor() : substr(md5($category->getName()), 0, 6);
$content .= "".htmlspecialchars($category->getName())." ";
}
}
diff --git a/views/bootstrap4/class.Bootstrap4.php b/views/bootstrap4/class.Bootstrap4.php
index 318da7566..16fc7c509 100644
--- a/views/bootstrap4/class.Bootstrap4.php
+++ b/views/bootstrap4/class.Bootstrap4.php
@@ -3554,7 +3554,7 @@ $('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev)
if($categories = $document->getCategories()) {
$content .= "
";
foreach($categories as $category) {
- $color = substr(md5($category->getName()), 0, 6);
+ $color = $category->getColor() ? $category->getColor() : substr(md5($category->getName()), 0, 6);
$content .= "".htmlspecialchars($category->getName())." ";
}
}