Color gradient to express utilization of IPv6 subnets

Bug #317800 reported by Morten Brekkevold
2
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Fix Released
Wishlist
Trond Kandal

Bug Description

The prefix matrix does not report subnet utilization percentages for IPv6 subnets, as is done for IPv4 subnets. This is because of the fact that saturating a typical /64 lan subnet is infeasible, and any real-world percentages would be extremely low. The actual number of active IPv6 addresses in a subnet is reported by the regular prefix report.

For IPv4 subnets, the prefix matrix will also use a graded background color to express utilization more visually. Steinar Hamre from NTNU suggests that a color gradient for IPv6 subnet utilization can be created based on a double logarithm. He proposes the following example code to accomplish this:

def dlog(x):
    return math.log(math.log(x+1)+1)

def color(count):
    t=256-int(255*dlog(count)/dlog(2**64))-1
    return "#%02x%02xff" % (t,t)

Tags: report
Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :

An idea may be to calculate the gradient in the HSV color model before converting to RGB for use in HTML. See Python's colorsys module for conversion methods.

Changed in nav:
importance: Undecided → Wishlist
Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :

One could also make use of the color_gradient function present in the nav.util module. This function will take two RGB triplets and produce a specified number of colors in the gradient range between the two. Selecting two colors, from "empty" to "fully saturated subnet", one could generate an arbitrary 256 color gradient and select from this using the double logarithm.

Changed in nav:
assignee: nobody → Trond Kandal (trond-kandal)
Changed in nav:
status: New → In Progress
Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :
Changed in nav:
status: In Progress → Fix Committed
milestone: none → 3.13.0
Changed in nav:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.