libs/core: Remove deprecated luci.bits which got replaced by bitlib
[project/luci.git] / applications / luci-statistics / luasrc / statistics / rrdtool / colors.lua
index cdd6f71057e2069c256000b01e287eebbe37e031..2da9f5a08a3742fb3a16823c90734220f53e2b88 100644 (file)
@@ -1,16 +1,30 @@
+--[[
+
+Luci statistics - diagram color helper class
+(c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+$Id$
+
+]]--
+
 module("luci.statistics.rrdtool.colors", package.seeall)
 
 require("luci.util")
-require("luci.bits")
 
 
 Instance = luci.util.class()
 
 function Instance.from_string( self, s )
        return {
-               luci.bits.Hex2Dec(s:sub(1,2)),
-               luci.bits.Hex2Dec(s:sub(3,4)),
-               luci.bits.Hex2Dec(s:sub(5,6))
+               tonumber(s:sub(1,2), 16),
+               tonumber(s:sub(3,4), 16),
+               tonumber(s:sub(5,6), 16)
        }
 end