Let H(G) be the harmonic index of a graph G, which is defined as: \(\begin{aligned} H(G) = \sum _{uv \in E(G)}\frac{2}{d_{G}(u) + d_{G}(v)}. \end{aligned}\) In this note, we define a new graph parameter \(\xi (G)\) satisfying some properties and prove that \(\xi (G) \le 2H(G)\) , with equality if and only if G is a non-trivial complete graph, possibly plus some additional isolated vertices. In particular, \(\xi (G)\) can be the chromatic number \(\chi (G)\) , the choice number \(\chi _{\ell }(G)\) , the DP-chromatic number \(\chi _{\text {DP}}(G)\) , the DP-paint number \(\chi _{\text {DPP}}(G)\) , the weak coloring number \(\text {wcol}(G)\) , the coloring number \(\text {col}(G)\) . Our result generalizes some corresponding known results.