7-segment-display game asset
I would create two materials, one for "on" segments and one for "off" segments. Then I would swap out the materials on each segment to display the correct number.

Here's a small script I made to do the job:

# Assumes segment objects are named
# SegmentA, SegmentB, ... as follows:
#   A
# B   C
#   D
# E   F
#   G

import bpy

segments = {
    "0": "ABCEFG",
    "1": "CF",
    "2": "ACDEG",
    "3": "ACDFG",
    "4": "BCDF",
    "5": "ABDFG",
    "6": "ABDEFG",
    "7": "ACF",
    "8": "ABCDEFG",
    "9": "ABCDFG"
}

def setdisplay (s):
    for x in list("ABCDEFG"):
        bpy.data.objects["Segment"+x].material_slots[0].material = bpy.data.materials["Off"]
    for x in list(segments[s]):
        bpy.data.objects["Segment"+x].material_slots[0].material = bpy.data.materials["On"]

setdisplay("4"); # or whatever